Example #1
0
 /**
  * Testing basic functionality
  *
  * @return void
  * @author Dan Cox
  */
 public function test_basicHelperTools()
 {
     $collection = new Collection($this->collectable);
     $collection->remove('testObj');
     $this->assertEquals('var', $collection->get('test'));
     $this->assertFalse(array_key_exists('testObj', $collection));
     $this->assertEquals(NULL, $collection->get('fake'));
 }
Example #2
0
 /**
  * Removes the registered environment from the Application.
  *
  * @param String $name - the environment name
  * @return Application
  * @author Dan Cox
  */
 public function deregisterEnvironment($name)
 {
     if ($this->envCollection->exists($name)) {
         $this->envCollection->remove($name);
         return $this;
     }
     // Throw exception
     throw new UnknownEnvironment($name);
 }