mirror of
https://github.com/mrclay/minify.git
synced 2025-01-18 05:38:16 +01:00
Clean up unit test messages
This commit is contained in:
parent
f3a408fd74
commit
66f2622705
@ -9,7 +9,7 @@ function test_Minify_Cache_File()
|
||||
|
||||
$cache = new Minify_Cache_File();
|
||||
|
||||
echo "NOTE: Minify_Cache_File : path is set to: '" . $cache->getPath() . "'.\n";
|
||||
echo " Minify_Cache_File : path is set to: '" . $cache->getPath() . "'.\n";
|
||||
|
||||
assertTrue(true === $cache->store($id, $data), $prefix . 'store');
|
||||
|
||||
|
@ -8,14 +8,14 @@ function test_Minify_Cache_Memcache()
|
||||
|
||||
if (! function_exists('memcache_set')) {
|
||||
if ($thisFileActive) {
|
||||
echo "NOTE: {$prefix}PHP lacks memcache support\n";
|
||||
echo " {$prefix}To test this component, install memcache in PHP\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
$mc = new Memcache;
|
||||
if (! @$mc->connect('localhost', 11211)) {
|
||||
if ($thisFileActive) {
|
||||
echo "NOTE: {$prefix}Could not connect to localhost:11211\n";
|
||||
echo " {$prefix}Memcache server not found on localhost:11211\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -65,10 +65,10 @@ function test_Minify_ClosureCompiler()
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "NONE: Minify_ClosureCompiler : Please download a compiler.jar from
|
||||
https://code.google.com/p/closure-compiler/wiki/BinaryDownloads
|
||||
put it under '${compiler_jar_path}' and make it readable by your webserver
|
||||
to test more functionality\n";
|
||||
echo " Minify_ClosureCompiler : To test more functionality, download a compiler.jar from\n";
|
||||
echo " https://code.google.com/p/closure-compiler/wiki/BinaryDownloads,\n";
|
||||
echo " put it under '${compiler_jar_path}',\n";
|
||||
echo " and make it readable by your webserver\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ function test_Minify_JS_ClosureCompiler()
|
||||
$minExpected = "(function(a,b){a.addOne=function(a){return 1+a};a.undefined=b})(window);";
|
||||
$minOutput = Minify_JS_ClosureCompiler::minify($src);
|
||||
if (false !== strpos($minOutput, 'Error(22): Too many compiles')) {
|
||||
echo "!NOTE: Too many recent calls to Closure Compiler API to test.\n";
|
||||
echo "!---: Minify_JS_ClosureCompiler : Too many recent calls to Closure Compiler API to test.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ function test_Minify_YuiCSS()
|
||||
$minOutput = Minify_YUICompressor::minifyCss($src);
|
||||
assertTrue(false, "Expected exception Not thrown");
|
||||
} catch (Exception $e) {
|
||||
assertTrue($e->getMessage() == 'Minify_YUICompressor : YUI compressor execution failed.', 'got expected Exception');
|
||||
assertTrue($e->getMessage() == 'Minify_YUICompressor : YUI compressor execution failed.', 'Minify_YUICompressor : got expected Exception');
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -43,11 +43,11 @@ function test_environment()
|
||||
. "cannot modify this, consider setting \$min_documentRoot in config.php\n\n";
|
||||
}
|
||||
if (isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
|
||||
echo "\n!NOTE: environment : \$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set. "
|
||||
echo "\n environment : \$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set. "
|
||||
. "You may need to set \$min_documentRoot to this in config.php\n";
|
||||
}
|
||||
if (realpath(__FILE__) !== realpath($_SERVER['DOCUMENT_ROOT'] . '/min_unit_tests/test_environment.php')) {
|
||||
echo "!NOTE: environment : /min_unit_tests/ is not directly inside DOCUMENT_ROOT\n";
|
||||
echo " environment : /min_unit_tests/ is not directly inside DOCUMENT_ROOT\n";
|
||||
}
|
||||
|
||||
$thisUrl = 'http://'
|
||||
@ -59,11 +59,11 @@ function test_environment()
|
||||
$oc = @file_get_contents($thisUrl . '?getOutputCompression=1');
|
||||
|
||||
if (false === $oc || ! preg_match('/^[01]$/', $oc)) {
|
||||
echo "!WARN: environment : Local HTTP request failed. Testing cannot continue.\n";
|
||||
echo "!---: environment : Local HTTP request failed. Testing cannot continue.\n";
|
||||
return;
|
||||
}
|
||||
if ('1' === $oc) {
|
||||
echo "!WARN: environment : zlib.output_compression is enabled in php.ini"
|
||||
echo "!---: environment : zlib.output_compression is enabled in php.ini"
|
||||
. " or .htaccess.\n";
|
||||
}
|
||||
|
||||
@ -88,9 +88,9 @@ function test_environment()
|
||||
if (! $passed) {
|
||||
$testFake = _test_environment_getHello($thisUrl . '?hello=faketype');
|
||||
if ($testFake['length'] == 6) {
|
||||
echo "!NOTE: environment : Server does not auto-encode arbitrary types. This\n"
|
||||
. " may indicate that the auto-encoding is caused by Apache's \n"
|
||||
. " AddOutputFilterByType.";
|
||||
echo " environment : Server does not auto-encode arbitrary types. This\n"
|
||||
. " may indicate that the auto-encoding is caused by Apache's\n"
|
||||
. " AddOutputFilterByType.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user