Version 1
[yaffs-website] / vendor / caxy / php-htmldiff / tests / Caxy / Tests / HtmlDiff / Performance / PerformanceTest.php
diff --git a/vendor/caxy/php-htmldiff/tests/Caxy/Tests/HtmlDiff/Performance/PerformanceTest.php b/vendor/caxy/php-htmldiff/tests/Caxy/Tests/HtmlDiff/Performance/PerformanceTest.php
new file mode 100644 (file)
index 0000000..ddbc4e4
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+namespace Caxy\Tests\HtmlDiff\Performance;
+
+use Caxy\HtmlDiff\HtmlDiff;
+use Caxy\Tests\AbstractTest;
+
+class PerformanceTest extends AbstractTest
+{
+    /**
+     * @group performance
+     */
+    public function testParagraphPerformance()
+    {
+        $fixturesPath = __DIR__ . '/../../../../fixtures/Performance/';
+
+        $expected = file_get_contents($fixturesPath . 'paragraphs_expected.html');
+
+        $diff = new HtmlDiff(
+            file_get_contents($fixturesPath . 'paragraphs.html'),
+            file_get_contents($fixturesPath . 'paragraphs_changed.html'),
+            'UTF-8', array()
+        );
+
+        $output = $diff->build();
+
+        $this->assertSame($this->stripExtraWhitespaceAndNewLines($output), $this->stripExtraWhitespaceAndNewLines($expected));
+    }
+}