3 namespace Caxy\Tests\HtmlDiff\Functional;
5 use Caxy\HtmlDiff\HtmlDiff;
6 use Caxy\Tests\AbstractTest;
7 use Caxy\Tests\HtmlDiff\HtmlFileIterator;
9 class HtmlDiffFunctionalTest extends AbstractTest
12 * @dataProvider diffContentProvider
18 public function testHtmlDiff($oldText, $newText, $expected)
20 $diff = new HtmlDiff(trim($oldText), trim($newText), 'UTF-8', array());
21 $output = $diff->build();
23 static::assertEquals($this->stripExtraWhitespaceAndNewLines($expected), $this->stripExtraWhitespaceAndNewLines($output));
26 public function diffContentProvider()
28 return new HtmlFileIterator(__DIR__.'/../../../../fixtures/HtmlDiff');