aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiOptionsTest.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2022-09-23 21:53:11 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2022-09-23 21:53:11 +0200
commit89b2d11a0dfbf9233166ca6df33819877d7ced1d (patch)
treea0cd0ce12e8892f55794b0bb22530e51dff1d504 /tests/phpunit/includes/api/ApiOptionsTest.php
parent1e60c7337ae7022863754c485d7e218d92cf3cb8 (diff)
downloadmediawikicore-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/api/ApiOptionsTest.php')
-rw-r--r--tests/phpunit/includes/api/ApiOptionsTest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php
index bdeb00ff8f00..ba0fa076dbcc 100644
--- a/tests/phpunit/includes/api/ApiOptionsTest.php
+++ b/tests/phpunit/includes/api/ApiOptionsTest.php
@@ -39,7 +39,7 @@ class ApiOptionsTest extends MediaWikiLangTestCase {
// Create a new context
$this->mContext = new DerivativeContext( new RequestContext() );
- $this->mContext->getContext()->setTitle( Title::newFromText( 'Test' ) );
+ $this->mContext->getContext()->setTitle( Title::makeTitle( NS_MAIN, 'Test' ) );
$this->mContext->setAuthority(
$this->mockUserAuthorityWithPermissions( $this->mUserMock, [ 'editmyoptions' ] )
);