array( "title" => "Example Blog", "author" => "John", "description" => "A short description of your blog", "home" => "on", "homeurl" => "../", "homename" => "Home", "mainname" => "", "intro" => "on", "disqus" => "rangitaki", "analytics" => "", "footer" => "Rangitaki 2016 \n gitlab.com/mmk2410/rangitaki", "url" => "https://example.com/blog/", ), "design" => array( "fab" => "on", "drawer" => "on", "theme" => "material-light", "pagination" => 0, "favicon" => "http://example.com/res/img/favicon.png", ), "rcc" => array( "rcc" => "on", "api" => "on", ), "language" => "en", ]; $configParser = new Config("./config.yaml", "./vendor/autoload.php"); $this->assertEquals($config, $configParser->getConfig()); } public function testWriteReadConfig() { $changedConfig = [ "blog" => array( "title" => "Examples Blog", "author" => "Wilson O'Sullivan", "description" => "A long description of your blog", "home" => "on", "homeurl" => "../", "homename" => "Exit", "mainname" => "", "intro" => "on", "disqus" => "", "analytics" => "", "footer" => "pBlog 1102 \n gitlab.com/mmk2410/rangitaki", "url" => "https://example.com/blog/", ), "design" => array( "fab" => "off", "drawer" => "off", "theme" => "material-dark", "pagination" => "-1", "favicon" => "http://sample.com/res/img/favicon.png", ), "rcc" => array( "rcc" => "on", "api" => "off", ), "language" => "en", ]; $configParser = new Config("/tmp/config-test.yaml", "./vendor/autoload.php"); $configParser->writeConfig($changedConfig); $this->assertEquals($changedConfig, $configParser->getConfig()); } }