aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/bootstrap.php
blob: c3be7366cd74fbf86f39599b721c20cbbef27b24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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');