public function ParameterBagTest::testSet

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

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php, line 100

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