Harden quarantine provisioning; enforce strict permissions and update Ansible and docs
This commit is contained in:
22
tests/ConfigTest.php
Normal file
22
tests/ConfigTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use UploadLogger\Core\Config;
|
||||
|
||||
final class ConfigTest extends TestCase
|
||||
{
|
||||
public function testDotNotationGetters(): void
|
||||
{
|
||||
$data = [
|
||||
'modules' => ['flood' => true],
|
||||
'limits' => ['max_size' => 12345, 'nested' => ['x' => 5]],
|
||||
];
|
||||
|
||||
$cfg = new Config($data);
|
||||
|
||||
$this->assertTrue($cfg->isModuleEnabled('flood'));
|
||||
$this->assertEquals(12345, $cfg->get('limits.max_size'));
|
||||
$this->assertEquals(5, $cfg->get('limits.nested.x'));
|
||||
$this->assertNull($cfg->get('limits.nonexistent'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user