Avoid NULL user name that caused test failures
Change-Id: Ifc3b19cc7e172300123e7d2c7153b4357917ca74
/**
* In-process cache for isAllowed lookups, by username.
* Contains a StatusValue object
- * @var HashBagOStuff
+ * @var MapCacheLRU
*/
private $permissionCache;
public function __construct( Config $config, AuthManager $authManager ) {
$this->config = $config;
$this->authManager = $authManager;
- $this->permissionCache = new HashBagOStuff( [ 'maxKeys' => 1 ] );
+ $this->permissionCache = new MapCacheLRU( 1 );
$this->logger = LoggerFactory::getInstance( 'authentication' );
}
$performingUser = $this->getMockBuilder( User::class )->getMock();
$performingUser->expects( $this->any() )->method( 'getRequest' )->willReturn( $request );
$performingUser->expects( $this->any() )->method( 'isAllowed' )->willReturn( true );
+ $performingUser->expects( $this->any() )->method( 'getName' )->willReturn( 'Performer' );
$targetUser1 = $this->getMockBuilder( User::class )->getMock();
$targetUser2 = $this->getMockBuilder( User::class )->getMock();