1
0
mirror of https://github.com/mrclay/minify.git synced 2025-01-17 21:28:14 +01:00
minify/tests/MinifyHTMLTest.php

35 lines
992 B
PHP
Raw Normal View History

2015-11-19 19:21:32 +02:00
<?php
2017-12-22 18:04:34 +02:00
namespace Minify\Test;
use Minify_HTML;
2017-12-22 17:58:01 +02:00
2015-11-19 19:21:32 +02:00
class MinifyHTMLTest extends TestCase
{
public function test1()
{
$src = file_get_contents(self::$test_files . '/html/before.html');
$minExpected = file_get_contents(self::$test_files . '/html/before.min.html');
$minOutput = Minify_HTML::minify($src, array(
'cssMinifier' => array('Minify_CSSmin', 'minify'),
'jsMinifier' => array('JSMin\\JSMin', 'minify'),
));
$this->assertEquals($minExpected, $minOutput);
}
public function test2()
{
$src = file_get_contents(self::$test_files . '/html/before2.html');
$minExpected = file_get_contents(self::$test_files . '/html/before2.min.html');
$minOutput = Minify_HTML::minify($src, array(
'cssMinifier' => array('Minify_CSSmin', 'minify'),
'jsMinifier' => array('JSMin\\JSMin', 'minify'),
));
$this->assertEquals($minExpected, $minOutput);
}
}