MCPcopy Create free account
hub / github.com/Rello/analytics / FakeAppManager

Class FakeAppManager

tests/Activity/ActivityAccessTest.php:226–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226class FakeAppManager implements IAppManager {
227 private $enabledUsers;
228
229 public function __construct(array $enabledUsers) {
230 $this->enabledUsers = $enabledUsers;
231 }
232
233 public function isEnabledForUser($appId, $user = null) {
234 if ($user === null) {
235 return false;
236 }
237
238 return $appId === 'analytics' && ($this->enabledUsers[$user->getUID()] ?? false);
239 }
240}
241
242class FakeUserManager implements IUserManager {
243 private $users;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected