*/ class DisplayTest extends TestCase { /** * Test the method tao_helpers_Display::sanitizeXssHtml * * @dataProvider dirtyHtmlProvider */ public function testSanitizeXssHtml($input, $expected) { $result = tao_helpers_Display::sanitizeXssHtml($input); $this->assertEquals($expected, $result); } /** * Data provider for testSanitizeXssHtml * @return array[] in the form of [input, expected] */ public function dirtyHtmlProvider() { return [ [ null, null ], [ '', '' ], [ 'foo', 'foo' ], [ 'foo €©¾', 'foo €©¾' ], [ '
', '
'], [ '
bar
', '
bar
'], [ 'link', 'link'], [ 'link', 'link'], [ '
logo
', '
logo
'], [ '
', '
'], [ '
', '
'], [ '
', '
'], ]; } }