Example #1
0
 /**
  * Gets an environments class name by its label
  *
  * @param String $name - the name of the environment
  * @return String
  * @author Dan Cox
  */
 public function getEnvironment($name)
 {
     if ($this->envCollection->exists($name)) {
         return $this->envCollection->get($name);
     }
     throw new UnknownEnvironment($name);
 }
Example #2
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'));
 }