/** * testParse * * @return void */ public function testParse() { $string = 'This is some <strong>Html text</strong>'; $result = $this->Parser->parse($string); $this->assertEquals(array($string), $result); $string = <<<HTML <h1>This is a first page</h1> <p> \tWith text and <script language="javascript">alert('scripts');</script> </p> <!-- Page separator --> <h1>This is a second page</h1> <p> \tWith other things </p> HTML; $result = Sanitize::stripWhiteSpace($this->Parser->parse($string)); $expected = array("<h1>This is a first page</h1><p>With text and </p>", "<h1>This is a second page</h1><p>With other things</p>"); $this->assertTextEquals($expected, $result); }