X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHtmlTest.php;h=6695fce3baef60f92705a238e680c9f9200726aa;hp=f3d49161a58434dcdae5af609771d7886b08100e;hb=c1c0d243522d477799bb5ca325a100fa6a86a7fd;hpb=4a5f646a7fea7cbe0421c5cf38b72bae5c1bcf65 diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index f3d49161a5..6695fce3ba 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -1,5 +1,4 @@ assertEquals( '' . "\n" . @@ -447,6 +452,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 @@ -637,6 +683,9 @@ class HtmlTest extends MediaWikiTestCase { return $ret; } + /** + * @covers Html::input + */ public function testWrapperInput() { $this->assertEquals( '', @@ -650,6 +699,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::check + */ public function testWrapperCheck() { $this->assertEquals( '', @@ -668,6 +720,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::radio + */ public function testWrapperRadio() { $this->assertEquals( '', @@ -686,6 +741,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::label + */ public function testWrapperLabel() { $this->assertEquals( '',