MediaWiki REL1_30
HTMLFormTest.php
Go to the documentation of this file.
1<?php
2
3
5 public function testGetHTML_empty() {
6 $form = new HTMLForm( [] );
7 $form->setTitle( Title::newFromText( 'Foo' ) );
8 $form->prepareForm();
9 $html = $form->getHTML( false );
10 $this->assertRegExp( '/<form\b/', $html );
11 }
12
16 public function testGetHTML_noPrepare() {
17 $form = new HTMLForm( [] );
18 $form->setTitle( Title::newFromText( 'Foo' ) );
19 $form->getHTML( false );
20 }
21}
testGetHTML_noPrepare()
LogicException.
Object handling generic submission, CSRF protection, layout and other logic for UI forms.
Definition HTMLForm.php:128
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition hooks.txt:1983