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

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

43 lines 986 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_Helper;
6
7 class ScssSourceTest extends TestCase
8 {
9 public function setUp()
10 {
11 $this->realDocRoot = $_SERVER['DOCUMENT_ROOT'];
12 $_SERVER['DOCUMENT_ROOT'] = self::$document_root;
13 }
14
15 /**
16 * @link https://github.com/mrclay/minify/issues/500
17 */
18 public function testTimestamp()
19 {
20 $baseDir = self::$test_files;
21
22 $mainLess = "$baseDir/main.scss";
23 $includedLess = "$baseDir/_included.scss";
24
25 // touch timestamp with 1s difference
26 touch($mainLess);
27 sleep(1);
28 touch($includedLess);
29
30 $mtime1 = filemtime($mainLess);
31 $mtime2 = filemtime($includedLess);
32
33 $max = max($mtime1, $mtime2);
34
35 $options = array(
36 'groupsConfigFile' => "$baseDir/htmlHelper_groupsConfig.php",
37 );
38 $res = Minify_HTML_Helper::getUri('scss', $options);
39
40 $this->assertEquals("/min/g=scss&amp;{$max}", $res);
41 }
42 }
43