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