1
0
mirror of https://github.com/mrclay/minify.git synced 2025-02-24 17:02:31 +01:00
Steve Clay c54ae9205c moved unit_tests to min_unit_tests
min/builder/index.php : + note about CSS imports
HISTORY.txt and README.txt additions
some text file renaming
tools removed
2008-09-11 20:37:16 +00:00

40 lines
1.0 KiB
PHP

<?php
require dirname(__FILE__) . '/../min/config.php';
if (!isset($min_libPath)) {
// default lib path is inside min
$min_libPath = dirname(__FILE__) . '/../min/lib';
}
set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
$minifyCachePath = isset($min_cachePath)
? $min_cachePath
: '';
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
header('Content-Type: text/plain');
$thisDir = dirname(__FILE__);
/**
* pTest - PHP Unit Tester
* @param mixed $test Condition to test, evaluated as boolean
* @param string $message Descriptive message to output upon test
* @url http://www.sitepoint.com/blogs/2007/08/13/ptest-php-unit-tester-in-9-lines-of-code/
*/
function assertTrue($test, $message)
{
static $count;
if (!isset($count)) $count = array('pass'=>0, 'fail'=>0, 'total'=>0);
$mode = $test ? 'pass' : 'fail';
$outMode = $test ? 'PASS' : '!FAIL';
printf("%s: %s (%d of %d tests run so far have %sed)\n",
$outMode, $message, ++$count[$mode], ++$count['total'], $mode);
return (bool)$test;
}