protected function MockArraySessionStorageTest::setUp

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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);
}