File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,13 @@ public function testAddContent()
214
214
$ crawler = new Crawler ();
215
215
$ crawler ->addContent ('<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><span>中文</span></html> ' );
216
216
$ this ->assertEquals ('中文 ' , $ crawler ->filterXPath ('//span ' )->text (), '->addContent() guess wrong charset ' );
217
+ }
217
218
219
+ /**
220
+ * @requires extension iconv
221
+ */
222
+ public function testAddContentNonUtf8 ()
223
+ {
218
224
$ crawler = new Crawler ();
219
225
$ crawler ->addContent (iconv ('UTF-8 ' , 'SJIS ' , '<html><head><meta charset="Shift_JIS"></head><body>日本語</body></html> ' ));
220
226
$ this ->assertEquals ('日本語 ' , $ crawler ->filterXPath ('//body ' )->text (), '->addContent() can recognize "Shift_JIS" in html5 meta charset tag ' );
You can’t perform that action at this time.
0 commit comments