1*a1a3b679SAndreas Boehler<?php 2*a1a3b679SAndreas Boehler 3*a1a3b679SAndreas Boehlerset_include_path(__DIR__ . '/../lib/' . PATH_SEPARATOR . __DIR__ . PATH_SEPARATOR . get_include_path()); 4*a1a3b679SAndreas Boehler 5*a1a3b679SAndreas Boehler$autoLoader = include __DIR__ . '/../vendor/autoload.php'; 6*a1a3b679SAndreas Boehler 7*a1a3b679SAndreas Boehler// SabreDAV tests auto loading 8*a1a3b679SAndreas Boehler$autoLoader->add('Sabre\\', __DIR__); 9*a1a3b679SAndreas Boehler// VObject tests auto loading 10*a1a3b679SAndreas Boehler$autoLoader->addPsr4('Sabre\\VObject\\',__DIR__ . '/../vendor/sabre/vobject/tests/VObject'); 11*a1a3b679SAndreas Boehler 12*a1a3b679SAndreas Boehlerdate_default_timezone_set('UTC'); 13*a1a3b679SAndreas Boehler 14*a1a3b679SAndreas Boehler$config = [ 15*a1a3b679SAndreas Boehler 'SABRE_TEMPDIR' => dirname(__FILE__) . '/temp/', 16*a1a3b679SAndreas Boehler 'SABRE_HASSQLITE' => in_array('sqlite',PDO::getAvailableDrivers()), 17*a1a3b679SAndreas Boehler 'SABRE_HASMYSQL' => in_array('mysql',PDO::getAvailableDrivers()), 18*a1a3b679SAndreas Boehler 'SABRE_MYSQLDSN' => 'mysql:host=127.0.0.1;dbname=sabredav', 19*a1a3b679SAndreas Boehler 'SABRE_MYSQLUSER' => 'root', 20*a1a3b679SAndreas Boehler 'SABRE_MYSQLPASS' => '', 21*a1a3b679SAndreas Boehler]; 22*a1a3b679SAndreas Boehler 23*a1a3b679SAndreas Boehlerforeach($config as $key=>$value) { 24*a1a3b679SAndreas Boehler if (!defined($key)) define($key, $value); 25*a1a3b679SAndreas Boehler} 26*a1a3b679SAndreas Boehler 27*a1a3b679SAndreas Boehlerif (!file_exists(SABRE_TEMPDIR)) mkdir(SABRE_TEMPDIR); 28*a1a3b679SAndreas Boehlerif (file_exists('.sabredav')) unlink('.sabredav'); 29