Skip to content

Commit adb9f19

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Skip test when iconv extension is missing Fix bundle commands are not available via find()
2 parents edb749f + 1a3ea98 commit adb9f19

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/CrawlerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ public function testAddContent()
214214
$crawler = new Crawler();
215215
$crawler->addContent('<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><span>中文</span></html>');
216216
$this->assertEquals('中文', $crawler->filterXPath('//span')->text(), '->addContent() guess wrong charset');
217+
}
217218

219+
/**
220+
* @requires extension iconv
221+
*/
222+
public function testAddContentNonUtf8()
223+
{
218224
$crawler = new Crawler();
219225
$crawler->addContent(iconv('UTF-8', 'SJIS', '<html><head><meta charset="Shift_JIS"></head><body>日本語</body></html>'));
220226
$this->assertEquals('日本語', $crawler->filterXPath('//body')->text(), '->addContent() can recognize "Shift_JIS" in html5 meta charset tag');

0 commit comments

Comments
 (0)