X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHtmlTest.php;h=a8829cd848db87c0f2451010a757b943667ab77d;hb=f97233896606a6f45c7f93db714e81b64aa9c0ab;hp=c561e70fd7f9830f12c79c5051bc9a4da756ab3a;hpb=ffefbca5378086a643e4ce7df09268db96f88bce;p=lhc%2Fweb%2Fwiklou.git
diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php
index c561e70fd7..a8829cd848 100644
--- a/tests/phpunit/includes/HtmlTest.php
+++ b/tests/phpunit/includes/HtmlTest.php
@@ -707,6 +707,63 @@ class HtmlTest extends MediaWikiTestCase {
)
);
}
+
+ public function testWrapperInput() {
+ $this->assertEquals(
+ '',
+ Html::input( 'testname', 'testval', 'radio' ),
+ 'Input wrapper with type and value.'
+ );
+ $this->assertEquals(
+ '',
+ Html::input( 'testname' ),
+ 'Input wrapper with all default values.'
+ );
+ }
+
+ public function testWrapperCheck() {
+ $this->assertEquals(
+ '',
+ Html::check( 'testname' ),
+ 'Checkbox wrapper unchecked.'
+ );
+ $this->assertEquals(
+ '',
+ Html::check( 'testname', true ),
+ 'Checkbox wrapper checked.'
+ );
+ $this->assertEquals(
+ '',
+ Html::check( 'testname', false, array( 'value' => 'testval' ) ),
+ 'Checkbox wrapper with a value override.'
+ );
+ }
+
+ public function testWrapperRadio() {
+ $this->assertEquals(
+ '',
+ Html::radio( 'testname' ),
+ 'Radio wrapper unchecked.'
+ );
+ $this->assertEquals(
+ '',
+ Html::radio( 'testname', true ),
+ 'Radio wrapper checked.'
+ );
+ $this->assertEquals(
+ '',
+ Html::radio( 'testname', false, array( 'value' => 'testval' ) ),
+ 'Radio wrapper with a value override.'
+ );
+ }
+
+ public function testWrapperLabel() {
+ $this->assertEquals(
+ '',
+ Html::label( 'testlabel', 'testid' ),
+ 'Label wrapper'
+ );
+ }
}
class HtmlTestValue {