���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/wiki.craftaro.com/tests/phpunit/unit/includes/libs/HtmlArmorTest.php
���ѧ٧ѧ�
<?php /** * @covers HtmlArmor */ class HtmlArmorTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; public static function provideConstructor() { return [ [ 'test' ], [ null ], [ '<em>some html!</em>' ] ]; } /** * @dataProvider provideConstructor */ public function testConstructor( $value ) { $this->assertInstanceOf( HtmlArmor::class, new HtmlArmor( $value ) ); } public static function provideGetHtml() { return [ [ 'foobar', 'foobar', ], [ '<script>alert("evil!");</script>', '<script>alert("evil!");</script>', ], [ new HtmlArmor( '<script>alert("evil!");</script>' ), '<script>alert("evil!");</script>', ], [ new HtmlArmor( null ), null, ] ]; } /** * @dataProvider provideGetHtml */ public function testGetHtml( $input, $expected ) { $this->assertEquals( $expected, HtmlArmor::getHtml( $input ) ); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.1 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�