# wp-optimize/3.2.5/vendor/mrclay/minify/tests/ScssSourceTest.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 3.2.5. 43 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/3.2.5/code/vendor/mrclay/minify/tests/ScssSourceTest.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.2.5/raw/vendor/mrclay/minify/tests/ScssSourceTest.php
- Modified: 2022-06-03T18:20:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/3.2.5/code/vendor/mrclay/minify/tests/ScssSourceTest.php#L10-L20`.

```php
<?php

namespace Minify\Test;

use Minify_HTML_Helper;

class ScssSourceTest extends TestCase
{
    public function setUp()
    {
        $this->realDocRoot = $_SERVER['DOCUMENT_ROOT'];
        $_SERVER['DOCUMENT_ROOT'] = self::$document_root;
    }

    /**
     * @link https://github.com/mrclay/minify/issues/500
     */
    public function testTimestamp()
    {
        $baseDir = self::$test_files;

        $mainLess = "$baseDir/main.scss";
        $includedLess = "$baseDir/_included.scss";

        // touch timestamp with 1s difference
        touch($mainLess);
        sleep(1);
        touch($includedLess);

        $mtime1 = filemtime($mainLess);
        $mtime2 = filemtime($includedLess);

        $max = max($mtime1, $mtime2);

        $options = array(
            'groupsConfigFile' => "$baseDir/htmlHelper_groupsConfig.php",
        );
        $res = Minify_HTML_Helper::getUri('scss', $options);

        $this->assertEquals("/min/g=scss&amp;{$max}", $res);
    }
}

```
