1
0
mirror of https://github.com/mrclay/minify.git synced 2025-02-23 00:12:36 +01:00
minify/min_unit_tests/test_Minify_Lines.php

32 lines
798 B
PHP

<?php
require_once '_inc.php';
function test_Lines()
{
global $thisDir;
$exp = file_get_contents("{$thisDir}/_test_files/minify/lines_output.js");
Minify::setCache(null); // no cache
$ret = Minify::serve('Files', array(
'debug' => true
,'quiet' => true
,'encodeOutput' => false
,'files' => array(
"{$thisDir}/_test_files/js/before.js"
)
));
$passed = assertTrue($exp === $ret['content'], 'Minify_Lines');
if (__FILE__ === realpath($_SERVER['SCRIPT_FILENAME'])) {
echo "\n---Output: " .countBytes($ret['content']). " bytes\n\n{$ret['content']}\n\n";
if (!$passed) {
echo "---Expected: " .countBytes($exp). " bytes\n\n{$exp}\n\n\n";
}
}
}
test_Lines();