public function NamespacedAttributeBagTest::testInitialize

File

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

Class

NamespacedAttributeBagTest
Tests NamespacedAttributeBag

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Attribute

Code

public function testInitialize() {
  $bag = new NamespacedAttributeBag();
  $bag
    ->initialize($this->array);
  $this
    ->assertEquals($this->array, $this->bag
    ->all());
  $array = array(
    'should' => 'not stick',
  );
  $bag
    ->initialize($array);

  // should have remained the same
  $this
    ->assertEquals($this->array, $this->bag
    ->all());
}