aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/bootstrap.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-21 15:46:31 -0700
committerfriendica <info@friendica.com>2013-10-21 15:46:31 -0700
commitb35122f7a6ad42756c35bb60ba1f06c3dcd45c77 (patch)
treeccdf373ce6475d264778523259cc32899b732fe7 /vendor/sabre/dav/tests/bootstrap.php
parente3504df514d306cfe6b83e44a11f550664564af4 (diff)
downloadvolse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.gz
volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.tar.bz2
volse-hubzilla-b35122f7a6ad42756c35bb60ba1f06c3dcd45c77.zip
add sabre (1.8.x) via composer in the !@#$ place it wants to be
Diffstat (limited to 'vendor/sabre/dav/tests/bootstrap.php')
-rw-r--r--vendor/sabre/dav/tests/bootstrap.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/sabre/dav/tests/bootstrap.php b/vendor/sabre/dav/tests/bootstrap.php
new file mode 100644
index 000000000..c3be7366c
--- /dev/null
+++ b/vendor/sabre/dav/tests/bootstrap.php
@@ -0,0 +1,22 @@
+<?php
+
+define('SABRE_MYSQLDSN','mysql:host=127.0.0.1;dbname=sabredav');
+define('SABRE_MYSQLUSER','root');
+define('SABRE_MYSQLPASS','');
+
+set_include_path(__DIR__ . '/../lib/' . PATH_SEPARATOR . __DIR__ . PATH_SEPARATOR . get_include_path());
+
+include __DIR__ . '/../vendor/autoload.php';
+include 'Sabre/DAVServerTest.php';
+
+date_default_timezone_set('GMT');
+
+define("SABRE_TEMPDIR",dirname(__FILE__) . '/temp/');
+
+// If sqlite is not available, this constant is used to skip the relevant
+// tests
+define('SABRE_HASSQLITE',in_array('sqlite',PDO::getAvailableDrivers()));
+define('SABRE_HASMYSQL', in_array('mysql',PDO::getAvailableDrivers()) && defined('SABRE_MYSQLDSN') && defined('SABRE_MYSQLUSER') && defined('SABRE_MYSQLPASS'));
+
+if (!file_exists(SABRE_TEMPDIR)) mkdir(SABRE_TEMPDIR);
+if (file_exists('.sabredav')) unlink('.sabredav');