Yaffs site version 1.1
[yaffs-website] / vendor / caxy / php-htmldiff / tests / Caxy / Tests / HtmlDiff / Performance / PerformanceTest.php
1 <?php
2
3 namespace Caxy\Tests\HtmlDiff\Performance;
4
5 use Caxy\HtmlDiff\HtmlDiff;
6 use Caxy\Tests\AbstractTest;
7
8 class PerformanceTest extends AbstractTest
9 {
10     /**
11      * @group performance
12      */
13     public function testParagraphPerformance()
14     {
15         $fixturesPath = __DIR__ . '/../../../../fixtures/Performance/';
16
17         $expected = file_get_contents($fixturesPath . 'paragraphs_expected.html');
18
19         $diff = new HtmlDiff(
20             file_get_contents($fixturesPath . 'paragraphs.html'),
21             file_get_contents($fixturesPath . 'paragraphs_changed.html'),
22             'UTF-8', array()
23         );
24
25         $output = $diff->build();
26
27         $this->assertSame($this->stripExtraWhitespaceAndNewLines($output), $this->stripExtraWhitespaceAndNewLines($expected));
28     }
29 }