From 0226e0ca0dc70f9a0310b3eef045ee1c1e0ca3ac Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Dec 2022 20:00:46 +0300 Subject: split into a separate repo --- .../html5/test/HTML5/Parser/UTF8UtilsTest.php | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php (limited to 'vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php') diff --git a/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php b/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php new file mode 100644 index 0000000..72c26a4 --- /dev/null +++ b/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php @@ -0,0 +1,28 @@ +assertEquals('éàa', $out); + } + + /** + * @todo add tests for invalid codepoints + */ + public function testCheckForIllegalCodepoints() + { + $smoke = 'Smoke test'; + $err = UTF8Utils::checkForIllegalCodepoints($smoke); + $this->assertEmpty($err); + + $data = "Foo Bar \0 Baz"; + $errors = UTF8Utils::checkForIllegalCodepoints($data); + $this->assertContains('null-character', $errors); + } +} -- cgit v1.2.3