6 class HtmlArmorTest
extends PHPUnit_Framework_TestCase
{
8 use MediaWikiCoversValidator
;
10 public static function provideConstructor() {
14 [ '<em>some html!</em>' ]
19 * @dataProvider provideConstructor
21 public function testConstructor( $value ) {
22 $this->assertInstanceOf( HtmlArmor
::class, new HtmlArmor( $value ) );
25 public static function provideGetHtml() {
32 '<script>alert("evil!");</script>',
33 '<script>alert("evil!");</script>',
36 new HtmlArmor( '<script>alert("evil!");</script>' ),
37 '<script>alert("evil!");</script>',
40 new HtmlArmor( null ),
47 * @dataProvider provideGetHtml
49 public function testGetHtml( $input, $expected ) {
52 HtmlArmor
::getHtml( $input )