sessionCallback = function () { return $this->createMock(ISession::class); }; } public function testCanAccessFilesystemDisabled(): void { $manager = new LockdownManager($this->sessionCallback); $this->assertTrue($manager->canAccessFilesystem()); } public function testCanAccessFilesystemAllowed(): void { $token = new PublicKeyToken(); $token->setScope([IToken::SCOPE_FILESYSTEM => true]); $manager = new LockdownManager($this->sessionCallback); $manager->setToken($token); $this->assertTrue($manager->canAccessFilesystem()); } public function testCanAccessFilesystemNotAllowed(): void { $token = new PublicKeyToken(); $token->setScope([IToken::SCOPE_FILESYSTEM => false]); $manager = new LockdownManager($this->sessionCallback); $manager->setToken($token); $this->assertFalse($manager->canAccessFilesystem()); } }