From c6c0e8f2ff590fd5b23159d2f1de219dbb000505 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 7 Jun 2015 13:45:47 +0200 Subject: fix test running --- includes/engelsystem_provider.php | 4 +++- test/phpunit.xml | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/includes/engelsystem_provider.php b/includes/engelsystem_provider.php index 56d12de6..1fe06e77 100644 --- a/includes/engelsystem_provider.php +++ b/includes/engelsystem_provider.php @@ -71,7 +71,9 @@ require_once realpath(__DIR__ . '/../includes/pages/user_shifts.php'); require_once realpath(__DIR__ . '/../vendor/parsedown/Parsedown.php'); -session_lifetime(24 * 60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__))); +if (! defined('PHPUNIT_TESTSUITE')) { + session_lifetime(24 * 60, preg_replace("/[^a-z0-9-]/", '', md5(__DIR__))); +} session_start(); gettext_init(); diff --git a/test/phpunit.xml b/test/phpunit.xml index a2c020ff..a27b9c1d 100644 --- a/test/phpunit.xml +++ b/test/phpunit.xml @@ -1,11 +1,14 @@ - - - model - - + xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.0/phpunit.xsd" + bootstrap="../includes/engelsystem_provider.php" colors="true" + convertErrorsToExceptions="true" convertNoticesToExceptions="true" + convertWarningsToExceptions="true" forceCoversAnnotation="false"> + + + model + + + + + -- cgit v1.2.3-70-g09d2