Merge "Enforce load.php's no-session constraint"
[lhc/web/wiklou.git] / tests / phpunit / includes / htmlform / HTMLFormTest.php
1 <?php
2
3
4 class HTMLFormTest extends MediaWikiTestCase {
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
13 /**
14 * @expectedException LogicException
15 */
16 public function testGetHTML_noPrepare() {
17 $form = new HTMLForm( [] );
18 $form->setTitle( Title::newFromText( 'Foo' ) );
19 $form->getHTML( false );
20 }
21 }