public function testRemove() { $bag = new ParameterBag(array('foo' => 'foo', 'bar' => 'bar')); $bag->remove('foo'); $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter'); $bag->remove('BAR'); $this->assertEquals(array(), $bag->all(), '->remove() converts key to lowercase before removing'); }
/** * @covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::clear */ public function testClear() { $bag = new ParameterBag($parameters = array( 'foo' => 'foo', 'bar' => 'bar', )); $bag->clear(); $this->assertEquals(array(), $bag->all(), '->clear() removes all parameters'); }
/** * @covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::remove */ public function testRemove() { $bag = new ParameterBag(array('foo' => 'foo', 'bar' => 'bar')); $bag->remove('foo'); $this->assertEquals(array('bar' => 'bar'), $bag->all(), '->remove() removes a parameter'); }
/** * Return all parameters. * * @return array */ public function getParameters() { return $this->parameters->all(); }