Mark tests as skipped if the sqlite extension is not available.
authorGunnar Wrobel <wrobel@temple.(none)>
Wed, 10 Feb 2010 16:53:41 +0000 (17:53 +0100)
committerGunnar Wrobel <wrobel@temple.(none)>
Wed, 10 Feb 2010 16:53:41 +0000 (17:53 +0100)
framework/Db/test/Horde/Db/Migration/BaseTest.php
framework/Db/test/Horde/Db/Migration/MigratorTest.php

index 4146e75..96cb0a9 100644 (file)
@@ -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()
index 22cfa94..3860513 100644 (file)
@@ -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 (