diff --git a/src/Settings.php b/src/Settings.php index 90124f9..eb1aeb5 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -32,7 +32,7 @@ class Settings implements \Iterator private array $settings = []; - private string $appPath; + private string $appPath = './'; private ?string $pkgPath = null; private ?string $site = null; diff --git a/tests/SettingsTest.php b/tests/SettingsTest.php new file mode 100644 index 0000000..1ee2e57 --- /dev/null +++ b/tests/SettingsTest.php @@ -0,0 +1,46 @@ +. + * + *///}}} +declare(strict_types=1); +namespace rabe\Util\tests; + +use rabe\Util\Settings; +use PHPUnit\Framework\TestCase; + +class SettingsTest extends TestCase +{ + public function testBuildFileName() + { + $path = './config/'; + $prefix = 'VeruA'; + $postfix = 'conf.php'; + $type = ''; + $defaultName = "$path$prefix.$type$postfix"; + + $cfg = new Settings(); + + $this->assertEquals($defaultName, $cfg->buildFileName()); + } +} + +/* jEdit buffer local properties {{{ + * :folding=explicit:collapseFolds=1: +}}}*/ \ No newline at end of file