* Test specifications by Alexandre "ialex" Emsenhuber.
* @todo give this test a real name explaining what is being tested here
*/
- public function testBug41337() {
+ public function testT43337() {
// Set a low limit
$this->setMwGlobals( 'wgMaxSigChars', 2 );
-
$user = $this->createMock( User::class );
$user->expects( $this->any() )
->method( 'isAnon' )
$user->method( 'getOptions' )
->willReturn( [] );
+ // isAnyAllowed used to return null from the mock,
+ // thus revoke it's permissions.
+ $this->overrideUserPermissions( $user, [] );
+
# Forge a request to call the special page
$context = new RequestContext();
$context->setRequest( new FauxRequest() );