Skip PDOSessionHandlerTest if PDO SQLite is not available
This commit is contained in:
parent
6c714095fa
commit
e509e6ffd1
@ -19,6 +19,10 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
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:");
|
$this->pdo = new \PDO("sqlite::memory:");
|
||||||
$sql = "CREATE TABLE sessions (sess_id VARCHAR(255) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)";
|
$sql = "CREATE TABLE sessions (sess_id VARCHAR(255) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)";
|
||||||
$this->pdo->exec($sql);
|
$this->pdo->exec($sql);
|
||||||
|
Reference in New Issue
Block a user