X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flibs%2FHtmlArmorTest.php;h=0e9469ad048915597ce5862dcef1e28715a2b0fe;hp=5f176e0c85c3d5353a17aba07906baede3ffba2b;hb=bb9e1c1aa906b3c6c2c19eb48c33b635dee6af20;hpb=a166e509431ab2f002e3ae68ac3b01a4261a9b16
diff --git a/tests/phpunit/includes/libs/HtmlArmorTest.php b/tests/phpunit/includes/libs/HtmlArmorTest.php
index 5f176e0c85..0e9469ad04 100644
--- a/tests/phpunit/includes/libs/HtmlArmorTest.php
+++ b/tests/phpunit/includes/libs/HtmlArmorTest.php
@@ -5,7 +5,22 @@
*/
class HtmlArmorTest extends PHPUnit_Framework_TestCase {
- public static function provideHtmlArmor() {
+ public static function provideConstructor() {
+ return [
+ [ 'test' ],
+ [ null ],
+ [ 'some html!' ]
+ ];
+ }
+
+ /**
+ * @dataProvider provideConstructor
+ */
+ public function testConstructor( $value ) {
+ $this->assertInstanceOf( HtmlArmor::class, new HtmlArmor( $value ) );
+ }
+
+ public static function provideGetHtml() {
return [
[
'foobar',
@@ -19,13 +34,17 @@ class HtmlArmorTest extends PHPUnit_Framework_TestCase {
new HtmlArmor( '' ),
'',
],
+ [
+ new HtmlArmor( null ),
+ null,
+ ]
];
}
/**
- * @dataProvider provideHtmlArmor
+ * @dataProvider provideGetHtml
*/
- public function testHtmlArmor( $input, $expected ) {
+ public function testGetHtml( $input, $expected ) {
$this->assertEquals(
$expected,
HtmlArmor::getHtml( $input )