X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fconfig%2FConfigPhpTest.php;h=7bf9fe64933925d23c4f96362894c512ea918997;hb=a5a9cf23acd1248585173aa32757d9720b5f2d62;hp=58cd8d2a27cbcc5d691b4af9d02ef2eddc7dd18b;hpb=649af5b501d2a90448242f53764ff693e9854039;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/config/ConfigPhpTest.php b/tests/config/ConfigPhpTest.php index 58cd8d2a..7bf9fe64 100644 --- a/tests/config/ConfigPhpTest.php +++ b/tests/config/ConfigPhpTest.php @@ -1,18 +1,21 @@ configIO = new ConfigPhp(); } @@ -37,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. */