From 3cb110bc490cc4b2d913ebf166323148131d6ea1 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Wed, 10 Feb 2010 17:53:41 +0100 Subject: [PATCH] Mark tests as skipped if the sqlite extension is not available. --- framework/Db/test/Horde/Db/Migration/BaseTest.php | 10 +++++++--- framework/Db/test/Horde/Db/Migration/MigratorTest.php | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/framework/Db/test/Horde/Db/Migration/BaseTest.php b/framework/Db/test/Horde/Db/Migration/BaseTest.php index 4146e75b2..96cb0a924 100644 --- a/framework/Db/test/Horde/Db/Migration/BaseTest.php +++ b/framework/Db/test/Horde/Db/Migration/BaseTest.php @@ -83,9 +83,13 @@ class Horde_Db_Migration_BaseTest extends PHPUnit_Framework_TestCase public function setUp() { - $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array( - 'dbname' => ':memory:', - )); + try { + $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array( + 'dbname' => ':memory:', + )); + } catch (Horde_Db_Exception $e) { + $this->markTestSkipped('The sqlite adapter is not available'); + } } public function testAddTable() diff --git a/framework/Db/test/Horde/Db/Migration/MigratorTest.php b/framework/Db/test/Horde/Db/Migration/MigratorTest.php index 22cfa94ce..3860513ef 100644 --- a/framework/Db/test/Horde/Db/Migration/MigratorTest.php +++ b/framework/Db/test/Horde/Db/Migration/MigratorTest.php @@ -28,9 +28,13 @@ class Horde_Db_Migration_MigratorTest extends PHPUnit_Framework_TestCase { $this->_logger = new Horde_Log_Logger(new Horde_Log_Handler_Null()); - $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array( - 'dbname' => ':memory:', - )); + try { + $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array( + 'dbname' => ':memory:', + )); + } catch (Horde_Db_Exception $e) { + $this->markTestSkipped('The sqlite adapter is not available'); + } /* CREATE TABLE users ( -- 2.11.0