$message
);
}
+
+ /**
+ * @dataProvider provideEscapeHtmlAllowEntities
+ * @covers Sanitizer::escapeHtmlAllowEntities
+ */
+ public function testEscapeHtmlAllowEntities( $expected, $html ) {
+ $this->assertEquals(
+ $expected,
+ Sanitizer::escapeHtmlAllowEntities( $html )
+ );
+ }
+
+ public static function provideEscapeHtmlAllowEntities() {
+ return array(
+ array( 'foo', 'foo' ),
+ array( 'a¡b', 'a¡b' ),
+ array( 'foo'bar', "foo'bar" ),
+ array( '<script>foo</script>', '<script>foo</script>' ),
+ );
+ }
+
}