PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.2.5
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.2.5
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / mrclay / minify / tests / MinifyHTMLTest.php

MinifyHTMLTest.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.2.5, at vendor/mrclay/minify/tests/MinifyHTMLTest.php

35 lines 992 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Minify\Test;
4
5 use Minify_HTML;
6
7 class MinifyHTMLTest extends TestCase
8 {
9 public function test1()
10 {
11 $src = file_get_contents(self::$test_files . '/html/before.html');
12 $minExpected = file_get_contents(self::$test_files . '/html/before.min.html');
13
14 $minOutput = Minify_HTML::minify($src, array(
15 'cssMinifier' => array('Minify_CSSmin', 'minify'),
16 'jsMinifier' => array('JSMin\\JSMin', 'minify'),
17 ));
18
19 $this->assertEquals($minExpected, $minOutput);
20 }
21
22 public function test2()
23 {
24 $src = file_get_contents(self::$test_files . '/html/before2.html');
25 $minExpected = file_get_contents(self::$test_files . '/html/before2.min.html');
26
27 $minOutput = Minify_HTML::minify($src, array(
28 'cssMinifier' => array('Minify_CSSmin', 'minify'),
29 'jsMinifier' => array('JSMin\\JSMin', 'minify'),
30 ));
31
32 $this->assertEquals($minExpected, $minOutput);
33 }
34 }
35