public function testMerge() { $pc = new Configuration(array('site' => array('title' => "Untitled", 'root' => "/"))); $this->assertEquals("Untitled", $pc->getValue('site/title')); $this->assertEquals("/", $pc->getValue('site/root')); $this->assertEquals(null, $pc->getValue('site/other')); $this->assertEquals(null, $pc->getValue('foo/bar')); $this->assertEquals(null, $pc->getValue('simple')); $pc->merge(array('site' => array('title' => "Merged Title", 'root' => "http://root", 'other' => "Something"), 'foo' => array('bar' => "FOO BAR!"), 'simple' => "simple value")); $this->assertEquals("Merged Title", $pc->getValue('site/title')); $this->assertEquals("http://root", $pc->getValue('site/root')); $this->assertEquals("Something", $pc->getValue('site/other')); $this->assertEquals("FOO BAR!", $pc->getValue('foo/bar')); $this->assertEquals("simple value", $pc->getValue('simple')); }