You are here

public function ParameterBagTest::testRemove in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/http-foundation/Tests/ParameterBagTest.php \Symfony\Component\HttpFoundation\Tests\ParameterBagTest::testRemove()
  2. 8.0 vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testRemove()
Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testRemove()

@covers Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::remove

File

vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php, line 49

Class

ParameterBagTest

Namespace

Symfony\Component\DependencyInjection\Tests\ParameterBag

Code

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');
}