You are here

public function ParameterBagTest::testClear in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testClear()

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

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ParameterBag/ParameterBagTest.php, line 36

Class

ParameterBagTest

Namespace

Symfony\Component\DependencyInjection\Tests\ParameterBag

Code

public function testClear() {
  $bag = new ParameterBag($parameters = array(
    'foo' => 'foo',
    'bar' => 'bar',
  ));
  $bag
    ->clear();
  $this
    ->assertEquals(array(), $bag
    ->all(), '->clear() removes all parameters');
}