You are here

public function ParameterBagTest::testClear in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php \Symfony\Component\DependencyInjection\Tests\ParameterBag\ParameterBagTest::testClear()

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

File

vendor/symfony/dependency-injection/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');
}