X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHtmlTest.php;h=999e0bb56c0d0a5de825d0745baf402f1d0a8d38;hb=37344b9daf313807380482c9e5cce6fe4ac88a6c;hp=156f702c07249f4443b0127414b2e8dd019643bd;hpb=a479750da672066b4189b115d1141a23d8c5cae3;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php index 156f702c07..999e0bb56c 100644 --- a/tests/phpunit/includes/HtmlTest.php +++ b/tests/phpunit/includes/HtmlTest.php @@ -76,6 +76,15 @@ class HtmlTest extends MediaWikiTestCase { parent::tearDown(); } + /** + * @expectedException PHPUnit_Framework_Error_Notice + * @expectedExceptionMessage given element name with space + * @covers Html::openElement + */ + public function testOpenElement() { + Html::openElement( 'span id="x"' ); + } + /** * @covers Html::element * @covers Html::rawElement @@ -203,7 +212,6 @@ class HtmlTest extends MediaWikiTestCase { } /** - * Test for Html::expandAttributes() * Please note it output a string prefixed with a space! * @covers Html::expandAttributes */ @@ -421,6 +429,33 @@ class HtmlTest extends MediaWikiTestCase { ), 'Basic namespace selector with a custom label but no id attribtue for the ' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '' . "\n" . + '', + Html::namespaceSelector( + [ 'in-user-lang' => true ] + ), + 'Basic namespace selector in user language' + ); } /**