diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2022-09-23 21:53:11 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2022-09-23 21:53:11 +0200 |
commit | 89b2d11a0dfbf9233166ca6df33819877d7ced1d (patch) | |
tree | a0cd0ce12e8892f55794b0bb22530e51dff1d504 /tests/phpunit/includes/htmlform/HTMLFormFieldTest.php | |
parent | 1e60c7337ae7022863754c485d7e218d92cf3cb8 (diff) | |
download | mediawikicore-89b2d11a0dfbf9233166ca6df33819877d7ced1d.tar.gz mediawikicore-89b2d11a0dfbf9233166ca6df33819877d7ced1d.zip |
tests: Use Title::makeTitle instead of Title::newFromText
Avoid parsing known titles in tests to improve performance
Change-Id: Ie240eb42479d19714e64cc4606e26073fadc2e13
Diffstat (limited to 'tests/phpunit/includes/htmlform/HTMLFormFieldTest.php')
-rw-r--r-- | tests/phpunit/includes/htmlform/HTMLFormFieldTest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/htmlform/HTMLFormFieldTest.php b/tests/phpunit/includes/htmlform/HTMLFormFieldTest.php index 73412e4c578b..a150e518f063 100644 --- a/tests/phpunit/includes/htmlform/HTMLFormFieldTest.php +++ b/tests/phpunit/includes/htmlform/HTMLFormFieldTest.php @@ -15,7 +15,7 @@ class HTMLFormFieldTest extends PHPUnit\Framework\TestCase { $context = new DerivativeContext( RequestContext::getMain() ); $context->setRequest( $request ); $form = HTMLForm::factory( 'ooui', $descriptor, $context ); - $form->setTitle( Title::newFromText( 'Main Page' ) )->setSubmitCallback( static function () { + $form->setTitle( Title::makeTitle( NS_MAIN, 'Main Page' ) )->setSubmitCallback( static function () { return true; } )->prepareForm(); $status = $form->trySubmit(); |