From 44ff776a96d256dd50806d8c5947634ad5ab8f04 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Wed, 6 Feb 2019 10:47:24 +0100 Subject: Fix test --- test/HTML5/Html5Test.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/HTML5/Html5Test.php') diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index 812d179..26d52fe 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -85,7 +85,7 @@ class Html5Test extends TestCase public function testEncodingUtf8() { - $dom = $this->html5->load(__DIR__.'/Fixtures/encoding/utf-8.html'); + $dom = $this->html5->load(__DIR__ . '/Fixtures/encoding/utf-8.html'); $this->assertInstanceOf('\DOMDocument', $dom); $this->assertEmpty($this->html5->getErrors()); $this->assertFalse($this->html5->hasErrors()); @@ -95,7 +95,7 @@ class Html5Test extends TestCase public function testEncodingWindows1252() { - $dom = $this->html5->load(__DIR__.'/Fixtures/encoding/windows-1252.html', array( + $dom = $this->html5->load(__DIR__ . '/Fixtures/encoding/windows-1252.html', array( 'encoding' => 'Windows-1252', )); @@ -103,7 +103,11 @@ class Html5Test extends TestCase $this->assertEmpty($this->html5->getErrors()); $this->assertFalse($this->html5->hasErrors()); - $this->assertContains('Ž�èýù', mb_convert_encoding($dom->saveHTML(), 'UTF-8', 'Windows-1252')); + $dumpedAsUtf8 = mb_convert_encoding($dom->saveHTML(), 'UTF-8', 'Windows-1252'); + $this->assertNotFalse(mb_strpos($dumpedAsUtf8, 'Ž')); + $this->assertNotFalse(mb_strpos($dumpedAsUtf8, 'è')); + $this->assertNotFalse(mb_strpos($dumpedAsUtf8, 'ý')); + $this->assertNotFalse(mb_strpos($dumpedAsUtf8, 'ù')); } public function testErrors() -- cgit v1.2.3