You are here

public function ParameterBagTest::testReplace in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/ParameterBagTest.php \Symfony\Component\HttpFoundation\Tests\ParameterBagTest::testReplace()

@covers Symfony\Component\HttpFoundation\ParameterBag::replace

File

vendor/symfony/http-foundation/Tests/ParameterBagTest.php, line 60

Class

ParameterBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testReplace() {
  $bag = new ParameterBag(array(
    'foo' => 'bar',
  ));
  $bag
    ->replace(array(
    'FOO' => 'BAR',
  ));
  $this
    ->assertEquals(array(
    'FOO' => 'BAR',
  ), $bag
    ->all(), '->replace() replaces the input with the argument');
  $this
    ->assertFalse($bag
    ->has('foo'), '->replace() overrides previously set the input');
}