merged branch jalliot/pdo_tests (PR #4051)
Commits
-------
e509e6f
Skip PDOSessionHandlerTest if PDO SQLite is not available
Discussion
----------
Skip PDOSessionHandlerTest if PDO SQLite is not available
This commit is contained in:
commit
03ad8c932d
@ -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);
|
||||
|
Reference in New Issue
Block a user