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 / MinifyBuildTest.php

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

29 lines 993 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_Build;
6 use Minify_Source;
7
8 class MinifyBuildTest extends TestCase
9 {
10 public function test()
11 {
12 $file1 = self::$test_files . '/css/paths_prepend.css';
13 $file2 = self::$test_files . '/css/styles.css';
14 $maxTime = max(filemtime($file1), filemtime($file2));
15
16 $b = new Minify_Build($file1);
17 $this->assertEquals($b->lastModified, filemtime($file1), 'single file path');
18
19 $b = new Minify_Build(array($file1, $file2));
20 $this->assertEquals($maxTime, $b->lastModified, 'multiple file paths');
21
22 $b = new Minify_Build(array($file1, new Minify_Source(array('filepath' => $file2))));
23
24 $this->assertEquals($maxTime, $b->lastModified, 'file path and a Minify_Source');
25 $this->assertEquals($b->uri('/path'), "/path?{$maxTime}", 'uri() with no querystring');
26 $this->assertEquals($b->uri('/path?hello'), "/path?hello&amp;{$maxTime}", 'uri() with existing querystring');
27 }
28 }
29