You are here

public function LegacyPdoSessionHandlerTest::testMultipleInstances in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php, line 72

Class

LegacyPdoSessionHandlerTest
@group legacy

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler

Code

public function testMultipleInstances() {
  $storage1 = new LegacyPdoSessionHandler($this->pdo, array(
    'db_table' => 'sessions',
  ));
  $storage1
    ->write('foo', 'bar');
  $storage2 = new LegacyPdoSessionHandler($this->pdo, array(
    'db_table' => 'sessions',
  ));
  $this
    ->assertEquals('bar', $storage2
    ->read('foo'), 'values persist between instances');
}