aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
commit0b02a6d123b2014705998c94ddf3d460948d3eac (patch)
tree78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php
parent40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff)
downloadvolse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php b/vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php
index 9f84566af..c9cc10d35 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/TestUtil.php
@@ -15,17 +15,8 @@ class TestUtil {
static function getSQLiteDB() {
- if (file_exists(SABRE_TEMPDIR . '/testdb.sqlite'))
- unlink(SABRE_TEMPDIR . '/testdb.sqlite');
+ $pdo = Backend\PDOSqliteTest::getSQLite();
- $pdo = new PDO('sqlite:' . SABRE_TEMPDIR . '/testdb.sqlite');
- $pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
-
- // Yup this is definitely not 'fool proof', but good enough for now.
- $queries = explode(';', file_get_contents(__DIR__ . '/../../../examples/sql/sqlite.addressbooks.sql'));
- foreach($queries as $query) {
- $pdo->exec($query);
- }
// Inserting events through a backend class.
$backend = new Backend\PDO($pdo);
$addressbookId = $backend->createAddressBook(
@@ -49,7 +40,12 @@ class TestUtil {
}
- static function getTestCardData($type = 1) {
+ static function deleteSQLiteDB() {
+ $sqliteTest = new Backend\PDOSqliteTest();
+ $pdo = $sqliteTest->tearDown();
+ }
+
+ static function getTestCardData() {
$addressbookData = 'BEGIN:VCARD
VERSION:3.0