1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-19 12:21:20 +02:00

port MinifyLinesTest to phpunit

This commit is contained in:
Steve Clay
2015-11-22 12:25:08 -05:00
parent 8a35a8d9ca
commit ae4b49fcee
3 changed files with 29 additions and 36 deletions

29
tests/MinifyLinesTest.php Normal file
View File

@@ -0,0 +1,29 @@
<?php
class MinifyLinesTest extends TestCase
{
public function test_lines()
{
$exp = file_get_contents(self::$test_files . "/minify/lines_output.js");
$env = new Minify_Env(array(
'server' => array(
'DOCUMENT_ROOT' => dirname(__DIR__),
),
));
$sourceFactory = new Minify_Source_Factory($env, array(), new Minify_Cache_Null());
$controller = new Minify_Controller_Files($env, $sourceFactory);
$minify = new Minify(new Minify_Cache_Null());
$ret = $minify->serve($controller, array(
'debug' => true
,'quiet' => true
,'encodeOutput' => false
,'files' => array(
self::$test_files . "/js/before.js"
)
));
$this->assertEquals($exp, $ret['content']);
}
}