/** * */ public function testIteratingAttributes() { $this->bag->add('foo', 'bar'); $this->bag->add('zee', 'bee'); foreach ($this->bag as $key => $value) { $this->assertEquals($value, $this->bag->get($key)); } }
/** * Add a new entry to our attribute bag. * * @param $key * @param $value */ public function add($key, $value) { if (!$this->attributes->has($key) && $value != null) { $this->attributes->add($key, $value); } }