You are here

protected function MockArraySessionStorageTest::setUp in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php, line 42

Class

MockArraySessionStorageTest
Test class for MockArraySessionStorage.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage

Code

protected function setUp() {
  $this->attributes = new AttributeBag();
  $this->flashes = new FlashBag();
  $this->data = array(
    $this->attributes
      ->getStorageKey() => array(
      'foo' => 'bar',
    ),
    $this->flashes
      ->getStorageKey() => array(
      'notice' => 'hello',
    ),
  );
  $this->storage = new MockArraySessionStorage();
  $this->storage
    ->registerBag($this->flashes);
  $this->storage
    ->registerBag($this->attributes);
  $this->storage
    ->setSessionData($this->data);
}