6 class HtmlArmorTest
extends PHPUnit_Framework_TestCase
{
8 public static function provideConstructor() {
12 [ '<em>some html!</em>' ]
17 * @dataProvider provideConstructor
19 public function testConstructor( $value ) {
20 $this->assertInstanceOf( HtmlArmor
::class, new HtmlArmor( $value ) );
23 public static function provideGetHtml() {
30 '<script>alert("evil!");</script>',
31 '<script>alert("evil!");</script>',
34 new HtmlArmor( '<script>alert("evil!");</script>' ),
35 '<script>alert("evil!");</script>',
38 new HtmlArmor( null ),
45 * @dataProvider provideGetHtml
47 public function testGetHtml( $input, $expected ) {
50 HtmlArmor
::getHtml( $input )