public function AttributeBagTest::testReplace

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php, line 124

Class

AttributeBagTest
Tests AttributeBag

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Attribute

Code

public function testReplace() {
  $array = array();
  $array['name'] = 'jack';
  $array['foo.bar'] = 'beep';
  $this->bag
    ->replace($array);
  $this
    ->assertEquals($array, $this->bag
    ->all());
  $this
    ->assertNull($this->bag
    ->get('hello'));
  $this
    ->assertNull($this->bag
    ->get('always'));
  $this
    ->assertNull($this->bag
    ->get('user.login'));
}