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

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

- Page: https://pluginprobe.com/plugins/wp-optimize/3.2.5/code/vendor/mrclay/minify/tests/MinifyCommentPreserverTest.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.2.5/raw/vendor/mrclay/minify/tests/MinifyCommentPreserverTest.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/MinifyCommentPreserverTest.php#L10-L20`.

```php
<?php

namespace Minify\Test;

use Minify_CommentPreserver;

class MinifyCommentPreserverTest extends TestCase
{
    public function test()
    {
        $inOut = array(
            '/*!*/' => "\n/*!*/\n",
            '/*!*/a' => "\n/*!*/\n1A",
            'a/*!*//*!*/b' => "2A\n/*!*/\n\n/*!*/\n3B",
            'a/*!*/b/*!*/' => "4A\n/*!*/\n5B\n/*!*/\n",
        );

        $processor = array(__CLASS__, '_test_MCP_processor');
        foreach ($inOut as $in => $expected) {
            $actual = Minify_CommentPreserver::process($in, $processor);
            $this->assertSame($expected, $actual, 'Minify_CommentPreserver');
        }
    }

    /**
     * @internal
     */
    public static function _test_MCP_processor($content, $options = array())
    {
        static $callCount = 0;
        ++$callCount;
        return $callCount . strtoupper($content);
    }
}

```
