3 require dirname(__FILE__) . '/../min/config.php';
5 set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
7 // set cache path and doc root if configured
8 $minifyCachePath = isset($min_cachePath)
11 if ($min_documentRoot) {
12 $_SERVER['DOCUMENT_ROOT'] = $min_documentRoot;
15 // default log to FirePHP
16 require_once 'Minify/Logger.php';
17 if ($min_errorLogger && true !== $min_errorLogger) { // custom logger
18 Minify_Logger::setLogger($min_errorLogger);
20 require_once 'FirePHP.php';
21 Minify_Logger::setLogger(FirePHP::getInstance(true));
24 error_reporting(E_ALL | E_STRICT);
25 ini_set('display_errors', 1);
27 header('Content-Type: text/plain');
29 $thisDir = dirname(__FILE__);
32 * pTest - PHP Unit Tester
33 * @param mixed $test Condition to test, evaluated as boolean
34 * @param string $message Descriptive message to output upon test
35 * @url http://www.sitepoint.com/blogs/2007/08/13/ptest-php-unit-tester-in-9-lines-of-code/
37 function assertTrue($test, $message)
40 if (!isset($count)) $count = array('pass'=>0, 'fail'=>0, 'total'=>0);
42 $mode = $test ? 'pass' : 'fail';
43 $outMode = $test ? 'PASS' : '!FAIL';
44 printf("%s: %s (%d of %d tests run so far have %sed)\n",
45 $outMode, $message, ++$count[$mode], ++$count['total'], $mode);