Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / tests / phpunit / includes / htmlform / HTMLFormTest.php
blobb7e0053c72d19c9aed963d0495dca40c2013e195
1 <?php
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 );
13 /**
14 * @expectedException LogicException
16 public function testGetHTML_noPrepare() {
17 $form = new HTMLForm( [] );
18 $form->setTitle( Title::newFromText( 'Foo' ) );
19 $form->getHTML( false );