parser = new Parser(); } public function testHtmlEscaping() { $text = 'a tag injection'; $html = '

<a>a tag injection</a>

'; $this->assertSame($html, $this->parser->transform($text)); } public function testScriptEscaping() { $text = ''; $html = '<script>alert("haha");</script>'; $this->assertSame($html, $this->parser->transform($text)); } }