X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fmasterminds%2Fhtml5%2Ftest%2FHTML5%2FParser%2FUTF8UtilsTest.php;fp=vendor%2Fmasterminds%2Fhtml5%2Ftest%2FHTML5%2FParser%2FUTF8UtilsTest.php;h=0e8555a9cc6c65068f91da6939d28c965397d3d1;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 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 000000000..0e8555a9c --- /dev/null +++ b/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php @@ -0,0 +1,26 @@ +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); + } +} \ No newline at end of file