add some tests and iconv support

This commit is contained in:
crazywhalecc
2023-04-03 21:27:50 +08:00
parent 1731cc1202
commit 29e0269588
6 changed files with 70 additions and 7 deletions

View File

@@ -2,4 +2,9 @@
declare(strict_types=1);
exit(class_exists('\\DOMDocument') ? 0 : 1);
if (!class_exists('\\DOMDocument')) {
exit(1);
}
$doc = new DOMDocument();
$doc->loadHtml("<html><head><meta charset=\"UTF-8\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body id='app'>Hello</body></html>");
exit($doc->getElementById('app')->nodeValue === 'Hello' ? 0 : 1);