Merge "Change php extract() to explicit code"
[lhc/web/wiklou.git] / tests / phpunit / includes / htmlform / HTMLFormTest.php
1 <?php
2
3 /**
4 * @covers HTMLForm
5 */
6 class HTMLFormTest extends MediaWikiTestCase {
7 public function testGetHTML_empty() {
8 $form = new HTMLForm( [] );
9 $form->setTitle( Title::newFromText( 'Foo' ) );
10 $form->prepareForm();
11 $html = $form->getHTML( false );
12 $this->assertRegExp( '/<form\b/', $html );
13 }
14
15 /**
16 * @expectedException LogicException
17 */
18 public function testGetHTML_noPrepare() {
19 $form = new HTMLForm( [] );
20 $form->setTitle( Title::newFromText( 'Foo' ) );
21 $form->getHTML( false );
22 }
23 }