http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90671
Revision: 90671
Author: hashar
Date: 2011-06-23 20:05:32 +0000 (Thu, 23 Jun 2011)
Log Message:
-----------
update tests for Xml::label which now support 'title' attribute
follow up r90669
Modified Paths:
--------------
trunk/phase3/tests/phpunit/includes/XmlTest.php
Modified: trunk/phase3/tests/phpunit/includes/XmlTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/XmlTest.php 2011-06-23 20:00:05 UTC
(rev 90670)
+++ trunk/phase3/tests/phpunit/includes/XmlTest.php 2011-06-23 20:05:32 UTC
(rev 90671)
@@ -193,7 +193,7 @@
'label() with no attribs'
);
}
- function testLabelAttributeCanOnlyBeClass() {
+ function testLabelAttributeCanOnlyBeClassOrTitle() {
$this->assertEquals(
'<label for="id">name</label>',
Xml::label( 'name', 'id', array( 'generated' => true )
),
@@ -205,14 +205,20 @@
'label() can get a class attribute'
);
$this->assertEquals(
- '<label for="id" class="nice">name</label>',
+ '<label for="id" title="nice tooltip">name</label>',
+ Xml::label( 'name', 'id', array( 'title' => 'nice
tooltip' ) ),
+ 'label() can get a title attribute'
+ );
+ $this->assertEquals(
+ '<label for="id" class="nice" title="nice
tooltip">name</label>',
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"'
);
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs