diff --git a/tests/core/topic_likes_test.php b/tests/core/topic_likes_test.php index 9d9a3bf..2e36d74 100644 --- a/tests/core/topic_likes_test.php +++ b/tests/core/topic_likes_test.php @@ -138,9 +138,14 @@ public function get_topic_like_counts(array $topic_ids) $property->setValue($rt, $value); } + // phpBB's real censor_text() (loaded by the test bootstrap) reads global $config, $user and + // $auth. allow_nocensors = 1 with acl_get() = true leaves the text untouched. $GLOBALS['phpbb_dispatcher'] = $dispatcher; $GLOBALS['config'] = ['allow_smilies' => 0, 'allow_nocensors' => 1]; $GLOBALS['user'] = $user; + $auth_global = $this->createMock(\phpbb\auth\auth::class); + $auth_global->method('acl_get')->willReturn(true); + $GLOBALS['auth'] = $auth_global; return $rt; }