diff --git a/tests/core/ConfigTest.php b/tests/core/ConfigTest.php index 29dd5ef34..21ae3bf43 100644 --- a/tests/core/ConfigTest.php +++ b/tests/core/ConfigTest.php @@ -1,6 +1,6 @@ assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'foo')); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'bar')); + $this->assertEquals(3, Config::inst()->get('ConfigTest_TestNest', 'foo')); + $this->assertEquals(5, Config::inst()->get('ConfigTest_TestNest', 'bar')); // Test nest copies data Config::nest(); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'foo')); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'bar')); + $this->assertEquals(3, Config::inst()->get('ConfigTest_TestNest', 'foo')); + $this->assertEquals(5, Config::inst()->get('ConfigTest_TestNest', 'bar')); // Test nested data can be updated - Config::inst()->update('ConfigTest_DefinesFooAndBar', 'foo', 4); - $this->assertEquals(4, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'foo')); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'bar')); + Config::inst()->update('ConfigTest_TestNest', 'foo', 4); + $this->assertEquals(4, Config::inst()->get('ConfigTest_TestNest', 'foo')); + $this->assertEquals(5, Config::inst()->get('ConfigTest_TestNest', 'bar')); // Test unnest restores data Config::unnest(); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'foo')); - $this->assertEquals(3, Config::inst()->get('ConfigTest_DefinesFooAndBar', 'bar')); + $this->assertEquals(3, Config::inst()->get('ConfigTest_TestNest', 'foo')); + $this->assertEquals(5, Config::inst()->get('ConfigTest_TestNest', 'bar')); } public function testUpdateStatic() { @@ -292,7 +299,7 @@ class ConfigTest extends SapphireTest { } } -class ConfigTest_Config_LRU extends Config_LRU { +class ConfigTest_Config_LRU extends Config_LRU implements TestOnly { public $cache; public $indexing;