From dfeeae38a9feaa30f5dec50a09476c03f431a196 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 3 Oct 2009 23:25:07 +0000 Subject: get rid of headers-already-sent-errors when running unit tests on cli git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@390 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/header.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/SemanticScuttle/header.php') diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php index b01679c..53dcad6 100644 --- a/src/SemanticScuttle/header.php +++ b/src/SemanticScuttle/header.php @@ -45,7 +45,9 @@ T_bind_textdomain_codeset($domain, 'UTF-8'); T_textdomain($domain); // 4 // Session -session_start(); +if (!defined('UNIT_TEST_MODE')) { + session_start(); +} // 5 // Create mandatory services and objects $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User'); @@ -57,5 +59,7 @@ $tplVars['currentUser'] = $currentUser; $tplVars['userservice'] = $userservice; // 6 // Force UTF-8 behaviour for server (cannot be move into top.inc.php which is not included into every file) -header('Content-Type: text/html; charset=utf-8'); +if (!defined('UNIT_TEST_MODE')) { + header('Content-Type: text/html; charset=utf-8'); +} ?> -- cgit v1.2.3