You are here

public function LegacyPdoSessionHandlerTest::testSessionDestroy in Zircon Profile 8.0

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

File

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

Class

LegacyPdoSessionHandlerTest
@group legacy

Namespace

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

Code

public function testSessionDestroy() {
  $storage = new LegacyPdoSessionHandler($this->pdo, array(
    'db_table' => 'sessions',
  ));
  $storage
    ->write('foo', 'bar');
  $this
    ->assertCount(1, $this->pdo
    ->query('SELECT * FROM sessions')
    ->fetchAll());
  $storage
    ->destroy('foo');
  $this
    ->assertCount(0, $this->pdo
    ->query('SELECT * FROM sessions')
    ->fetchAll());
}