public function testGet() { $manifest = new SS_ConfigStaticManifest(); // Test madeup value $this->assertNull($manifest->get(__CLASS__, 'madeup', null)); // Test string value $this->assertEquals('string', $manifest->get(__CLASS__, 'testString')); // Test array value $this->assertEquals(array('foo' => 'bar'), $manifest->get(__CLASS__, 'testArray')); // Test to ensure we're only picking up private statics $this->assertNull($manifest->get(__CLASS__, 'ignored', null)); // Test madeup class if (!class_exists('aonsffgrgx')) { $this->assertNull($manifest->get('aonsffgrgx', 'madeup', null)); } }
/** * Clears the cached statics manifest * @return void */ function clear_config_static_manifest() { $manifest = new \SS_ConfigStaticManifest(BASE_PATH); $manifest->regenerate(true); }