X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHtmlTest.php;h=7e32770b335aacb90b86b8f3dbf630d472ee6693;hp=f3d49161a58434dcdae5af609771d7886b08100e;hb=0c77841534d9139b0042696fe015a15d3e349ef5;hpb=cd5397fb0e77eaedb604745a777246471b4a7a1f diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index f3d49161a5..7e32770b33 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -386,6 +386,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::namespaceSelector + */ public function testCanFilterOutNamespaces() { $this->assertEquals( '' . "\n" . @@ -447,6 +453,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 +684,9 @@ class HtmlTest extends MediaWikiTestCase { return $ret; } + /** + * @covers Html::input + */ public function testWrapperInput() { $this->assertEquals( '', @@ -650,6 +700,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::check + */ public function testWrapperCheck() { $this->assertEquals( '', @@ -668,6 +721,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::radio + */ public function testWrapperRadio() { $this->assertEquals( '', @@ -686,6 +742,9 @@ class HtmlTest extends MediaWikiTestCase { ); } + /** + * @covers Html::label + */ public function testWrapperLabel() { $this->assertEquals( '',