| 224 | } |
| 225 | |
| 226 | class 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 | |
| 242 | class FakeUserManager implements IUserManager { |
| 243 | private $users; |
nothing calls this directly
no outgoing calls
no test coverage detected