aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php47
1 files changed, 1 insertions, 46 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php
index 5a4a7a327..b187c4d78 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/PDOSqliteTest.php
@@ -2,53 +2,8 @@
namespace Sabre\CardDAV\Backend;
-require_once 'Sabre/TestUtil.php';
-
class PDOSqliteTest extends AbstractPDOTest {
- function tearDown() {
-
- if (file_exists(SABRE_TEMPDIR . '/pdobackend')) unlink(SABRE_TEMPDIR . '/pdobackend');
- if (file_exists(SABRE_TEMPDIR . '/pdobackend2')) unlink(SABRE_TEMPDIR . '/pdobackend2');
-
- }
-
- /**
- * @return PDO
- */
- function getPDO() {
-
- return self::getSQLite();
-
- }
-
- /**
- * @return PDO
- */
- static function getSQLite() {
-
- if (!SABRE_HASSQLITE) $this->markTestSkipped('SQLite driver is not available');
- $pdo = new \PDO('sqlite:'.SABRE_TEMPDIR.'/pdobackend');
- $pdo->setAttribute(\PDO::ATTR_ERRMODE,\PDO::ERRMODE_EXCEPTION);
-
- $pdo->query("DROP TABLE IF EXISTS addressbooks");
- $pdo->query("DROP TABLE IF EXISTS addressbookchanges");
- $pdo->query("DROP TABLE IF EXISTS cards");
-
- $queries = explode(
- ';',
- file_get_contents(__DIR__ . '/../../../../examples/sql/sqlite.addressbooks.sql')
- );
-
- foreach($queries as $query) {
- $query = trim($query," \r\n\t");
- if ($query)
- $pdo->exec($query);
- }
-
- return $pdo;
-
- }
+ public $driver = 'sqlite';
}
-