Fixed regex pattern for configuration properties being considered invalid when they contain an underscore.

This commit is contained in:
netkas 2024-10-29 00:23:02 -04:00
parent e96695a5d8
commit 0d823c88e7
4 changed files with 23 additions and 9 deletions

View file

@ -9,7 +9,11 @@ class ConfigurationTest extends TestCase
public static function setUpBeforeClass(): void
{
$config = new Configuration('test');
unlink($config->getPath());
if(file_exists($config->getPath()))
{
unlink($config->getPath());
}
}
public function testConstruct(): void
@ -24,6 +28,7 @@ class ConfigurationTest extends TestCase
$this->assertTrue($config->set('key1.key2', 'value', true));
$this->assertEquals('value', $config->get('key1.key2'));
}
public function testSetNotExists(): void