/**
  * @test
  * @dataProvider	provideValidParams
  * @return	null
  */
 public function addGetExistConfigItem($key, $value)
 {
     $this->assertEquals(array(), ConfigRegistry::getAll());
     $this->assertFalse(ConfigRegistry::exists($key));
     $this->assertNull(ConfigRegistry::add($key, $value));
     $this->assertTrue(ConfigRegistry::exists($key));
     $this->assertEquals($value, ConfigRegistry::get($key));
 }
Beispiel #2
0
 /**
  * @return	array
  */
 public function getTasksFromRegistry()
 {
     return ConfigRegistry::get('startup-tasks', array());
 }
 /**
  * @test
  * @depends	createTaskHandler
  * @return	null
  */
 public function getTasksFromRegistryWhenEmpty(TaskHandler $handler)
 {
     $tasks = ConfigRegistry::get('startup-tasks', array());
     $this->assertEquals(array(), $tasks);
     $result = $handler->getTasksFromRegistry();
     $this->assertEquals(array(), $result);
 }