X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHtmlTest.php;h=e867f5ec7b33aba9d03a4e2ee9c6f09405aff5d0;hp=b7249e5d9466a14cda5ef965be37244c463aa993;hb=ba45450febab7e5d8aad439fb1e6da4b0d2a3ee9;hpb=93222688610be9735eb53aef30683e1c231b2833 diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index b7249e5d94..e867f5ec7b 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -41,6 +41,9 @@ class HtmlTest extends MediaWikiTestCase { /** * @covers Html::element + * @covers Html::rawElement + * @covers Html::openElement + * @covers Html::closeElement */ public function testElementBasics() { $this->assertEquals( @@ -302,6 +305,7 @@ class HtmlTest extends MediaWikiTestCase { /** * @covers Html::namespaceSelector + * @covers Html::namespaceSelectorOptions */ public function testNamespaceSelector() { $this->assertEquals( @@ -443,6 +447,47 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::warningBox + * @covers Html::messageBox + */ + public function testWarningBox() { + $this->assertEquals( + Html::warningBox( 'warn' ), + '
warn
' + ); + } + + /** + * @covers Html::errorBox + * @covers Html::messageBox + */ + public function testErrorBox() { + $this->assertEquals( + Html::errorBox( 'err' ), + '
err
' + ); + $this->assertEquals( + Html::errorBox( 'err', 'heading' ), + '

heading

err
' + ); + } + + /** + * @covers Html::successBox + * @covers Html::messageBox + */ + public function testSuccessBox() { + $this->assertEquals( + Html::successBox( 'great' ), + '
great
' + ); + $this->assertEquals( + Html::successBox( '' ), + '
' + ); + } + /** * List of input element types values introduced by HTML5 * Full list at https://www.w3.org/TR/html-markup/input.html @@ -584,7 +629,7 @@ class HtmlTest extends MediaWikiTestCase { ]; # ', 'button', [ 'type' => 'submit' ], 'According to standard the default type is "submit". '