From 801af66a4e5d6ee9a5b17a4cf1f0e4dfa6f55848 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 19 Apr 2011 11:07:58 +0200 Subject: [PATCH] Apparently header() does kind of work for php-cli, but of course breaks horribly. Luckily Pluf has a little knob (IN_UNIT_TESTS) that can prevent this breakage. --- test/bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/bootstrap.php b/test/bootstrap.php index c72e63a..7c10d09 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -5,6 +5,9 @@ if (!file_exists($config_file)) { die("'test/config.php' does not exist\n"); } +// prevents function calls in Pluf that break tests under php-cli +define('IN_UNIT_TESTS', 1); + echo ">>> setting paths...\n"; define('SRCDIR', realpath(dirname(__FILE__) . '/../src')); define('TESTDIR', dirname(__FILE__));