summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitouan Galopin <[email protected]>2019-02-06 10:47:24 +0100
committerTitouan Galopin <[email protected]>2019-02-06 11:38:38 +0100
commit44ff776a96d256dd50806d8c5947634ad5ab8f04 (patch)
treeaa999037a6371fc637477ca42c7e4881cc0a0479
parentab776a0cd0f02a579b8aae6acdd6c3fe6e9d33e2 (diff)
Fix test
-rw-r--r--test/HTML5/Html5Test.php10
1 files changed, 7 insertions, 3 deletions
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('Ž&#65533;&#232;ý&#249;', 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()