aboutsummaryrefslogtreecommitdiffstats
path: root/includes/context/RequestContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/context/RequestContext.php')
-rw-r--r--includes/context/RequestContext.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php
index 35fd5adb2d8c..ac1a1b48501b 100644
--- a/includes/context/RequestContext.php
+++ b/includes/context/RequestContext.php
@@ -388,7 +388,7 @@ class RequestContext implements IContextSource, MutableContext {
}
public function hasUser(): bool {
- if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
+ if ( !defined( 'MW_PHPUNIT_TEST' ) && !defined( 'MW_PARSER_TEST' ) ) {
throw new LogicException( __METHOD__ . '() should be called only from tests!' );
}
return $this->user !== null;