public function PdoSessionHandlerTest::testWithLazyDsnConnection in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\PdoSessionHandlerTest::testWithLazyDsnConnection()
File
- vendor/
symfony/ http-foundation/ Tests/ Session/ Storage/ Handler/ PdoSessionHandlerTest.php, line 84
Class
Namespace
Symfony\Component\HttpFoundation\Tests\Session\Storage\HandlerCode
public function testWithLazyDsnConnection() {
$dsn = $this
->getPersistentSqliteDsn();
$storage = new PdoSessionHandler($dsn);
$storage
->createTable();
$storage
->open('', 'sid');
$data = $storage
->read('id');
$storage
->write('id', 'data');
$storage
->close();
$this
->assertSame('', $data, 'New session returns empty string data');
$storage
->open('', 'sid');
$data = $storage
->read('id');
$storage
->close();
$this
->assertSame('data', $data, 'Written value can be read back correctly');
}