remove() публичный Метод

Removes a parameter.
public remove ( string $name )
$name string The parameter name
Пример #1
0
 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');
 }
Пример #2
0
 /**
  * @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');
 }