testing Unity Tests

This commit is contained in:
Norbert Wagner 2021-01-06 17:50:32 +01:00
parent d61ccf69f7
commit edebd9f02d
2 changed files with 47 additions and 1 deletions

View file

@ -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;

46
tests/SettingsTest.php Normal file
View file

@ -0,0 +1,46 @@
<?php
/* {{{ Copyright and License Notice
*
* Copyright © 2021 RaBe Websolutions
*
* This file is part of rabe/Util-Settings.
*
* rabe/Util-Settings is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* rabe/Util-Settings is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with rabe/Util-Settings. If not, see <https://www.gnu.org/licenses/>.
*
*///}}}
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:
}}}*/