Ejemplo n.º 1
0
 public function testReset()
 {
     Pfw_Config::init();
     $conf = Pfw_Config::getConfig();
     $this->assertEquals('My Web Host', Pfw_Config::get('webhost'));
     Pfw_Config::setConfig(array('test' => 'ok'));
     $this->assertEquals('ok', Pfw_Config::get('test'));
     $this->assertEquals(null, Pfw_Config::get('webhost'));
     Pfw_Config::reset();
     Pfw_Config::init();
     $this->assertEquals(null, Pfw_Config::get('test'));
     $this->assertEquals('My Web Host', Pfw_Config::get('webhost'));
 }
Ejemplo n.º 2
0
 public function testOptions()
 {
     Pfw_Config::setConfig(array('local_cache' => array('class' => 'Pfw_Cache_Stub', 'stuff' => 'ok')));
     $this->assertEquals(array('stuff' => 'ok'), Pfw_Cache_Local::getInstance()->options);
 }