From e509e6ffd1cdc00d07d27cbf0e63b03df5f85f41 Mon Sep 17 00:00:00 2001 From: Jordan Alliot Date: Sat, 21 Apr 2012 12:28:57 +0200 Subject: [PATCH] Skip PDOSessionHandlerTest if PDO SQLite is not available --- .../Tests/Session/Storage/Handler/PdoSessionHandlerTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index b59bf3429e..d0938e0d37 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -19,6 +19,10 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase protected function setUp() { + if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) { + $this->markTestSkipped('This test requires SQLite support in your environment'); + } + $this->pdo = new \PDO("sqlite::memory:"); $sql = "CREATE TABLE sessions (sess_id VARCHAR(255) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)"; $this->pdo->exec($sql);