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.
feature-issue_links
Thomas Keller 2011-04-19 11:07:58 +02:00
parent df6ffdf420
commit 801af66a4e
1 changed files with 3 additions and 0 deletions

View File

@ -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__));