summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/api/ApiTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/api/ApiTestCase.php')
-rw-r--r--tests/phpunit/includes/api/ApiTestCase.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php
index da62bb0a..21345ac1 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -105,6 +105,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
$wgRequest = new FauxRequest( $params, true, $session );
RequestContext::getMain()->setRequest( $wgRequest );
+ RequestContext::getMain()->setUser( $wgUser );
// set up local environment
$context = $this->apiContext->newTestContext( $wgRequest, $wgUser );