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=f3d49161a58434dcdae5af609771d7886b08100e;hb=c8e482371407477ecd4f0a1b5778e565d3963a93;hpb=a8a5f03b3b6653136c4dc5925d6bb2b806010725 diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index f3d49161a5..e867f5ec7b 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -447,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