X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fconfig%2FConfigPhpTest.php;h=fb91b51ba6007e9c1452dea17fa6681076ff1bc1;hb=def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e;hp=abfbb30538f7f27b06468a3be6887a0ebe1f3de1;hpb=236239be752a7bb24547237b5751ac4fcbc0e549;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index abfbb305..fb91b51b 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php @@ -3,8 +3,12 @@ namespace Shaarli\Config; /** * Class ConfigPhpTest + * + * We run tests in separate processes due to the usage for $GLOBALS + * which are kept between tests. + * @runTestsInSeparateProcesses */ -class ConfigPhpTest extends \PHPUnit_Framework_TestCase +class ConfigPhpTest extends \PHPUnit\Framework\TestCase { /** * @var ConfigPhp @@ -36,6 +40,20 @@ class ConfigPhpTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array(), $this->configIO->read('nope')); } + /** + * Read an empty existent config file -> array with blank default values. + */ + public function testReadEmpty() + { + $dataFile = 'tests/utils/config/emptyConfigPhp.php'; + $conf = $this->configIO->read($dataFile); + $this->assertEmpty($conf['login']); + $this->assertEmpty($conf['title']); + $this->assertEmpty($conf['titleLink']); + $this->assertEmpty($conf['config']); + $this->assertEmpty($conf['plugins']); + } + /** * Write a new config file. */