public function testRetrievalOfValues() { $array = array('var1' => "I'm a variable", 'var2' => "I'm a variable, too", 'var3' => "I'm a variable as well", 'var4' => "Guess what, I'm a variable"); $object = new Collection($array); $this->assertEquals("I'm a variable", $object->get('var1')); $this->assertEquals("I'm a variable, too", $object['var2']); }
public function add(&$behavior, $label = null) { if (!$this->has($behavior->name())) { parent::add($behavior); } }
public function last() { $value = parent::last(); return $this->convert($value); }