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.
This commit is contained in:
Thomas Keller 2011-04-19 11:07:58 +02:00
parent df6ffdf420
commit 801af66a4e

View File

@ -5,6 +5,9 @@ if (!file_exists($config_file)) {
die("'test/config.php' does not exist\n"); 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"; echo ">>> setting paths...\n";
define('SRCDIR', realpath(dirname(__FILE__) . '/../src')); define('SRCDIR', realpath(dirname(__FILE__) . '/../src'));
define('TESTDIR', dirname(__FILE__)); define('TESTDIR', dirname(__FILE__));