You are here

public function NamespacedAttributeBagTest::testInitialize in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php \Symfony\Component\HttpFoundation\Tests\Session\Attribute\NamespacedAttributeBagTest::testInitialize()

File

vendor/symfony/http-foundation/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());
}