From 940f3d5f93708c7aeee03dd05a74ce08247ffe97 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 23 Jun 2011 20:05:32 +0000 Subject: [PATCH] update tests for Xml::label which now support 'title' attribute follow up r90669 --- tests/phpunit/includes/XmlTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/includes/XmlTest.php b/tests/phpunit/includes/XmlTest.php index b7eb6a3d62..a7bd2659cd 100644 --- a/tests/phpunit/includes/XmlTest.php +++ b/tests/phpunit/includes/XmlTest.php @@ -193,7 +193,7 @@ class XmlTest extends MediaWikiTestCase { 'label() with no attribs' ); } - function testLabelAttributeCanOnlyBeClass() { + function testLabelAttributeCanOnlyBeClassOrTitle() { $this->assertEquals( '', Xml::label( 'name', 'id', array( 'generated' => true ) ), @@ -205,14 +205,20 @@ class XmlTest extends MediaWikiTestCase { 'label() can get a class attribute' ); $this->assertEquals( - '', + '', + Xml::label( 'name', 'id', array( 'title' => 'nice tooltip' ) ), + 'label() can get a title attribute' + ); + $this->assertEquals( + '', Xml::label( 'name', 'id', array( 'generated' => true, 'class' => 'nice', + 'title' => 'nice tooltip', 'anotherattr' => 'value', ) ), - 'label() skip all attributes but "class"' + 'label() skip all attributes but "class" and "title"' ); } -- 2.20.1