You are here

public function ParameterBagTest::testSet 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::testSet()

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

File

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

Class

ParameterBagTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSet() {
  $bag = new ParameterBag(array());
  $bag
    ->set('foo', 'bar');
  $this
    ->assertEquals('bar', $bag
    ->get('foo'), '->set() sets the value of parameter');
  $bag
    ->set('foo', 'baz');
  $this
    ->assertEquals('baz', $bag
    ->get('foo'), '->set() overrides previously set parameter');
}