Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/tests/phpunit/unit/includes/libs/HtmlArmorTest.php
Ðазад
<?php namespace Wikimedia\Tests; use HtmlArmor; use MediaWikiCoversValidator; use PHPUnit\Framework\TestCase; /** * @covers \HtmlArmor */ class HtmlArmorTest extends 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.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка