diff --git a/tests/ACL/ACLManagerTest.php b/tests/ACL/ACLManagerTest.php index ab118b776..b733fb926 100644 --- a/tests/ACL/ACLManagerTest.php +++ b/tests/ACL/ACLManagerTest.php @@ -36,20 +36,14 @@ use Test\TestCase; class ACLManagerTest extends TestCase { - /** @var RuleManager */ - private $ruleManager; - /** @var TrashManager */ - private $trashManager; - /** @var LoggerInterface */ - private $logger; - /** @var IUser */ - private $user; - /** @var ACLManager */ - private $aclManager; - /** @var IUserMapping */ - private $dummyMapping; + private RuleManager $ruleManager; + private TrashManager $trashManager; + private LoggerInterface $logger; + private IUser $user; + private ACLManager $aclManager; + private IUserMapping $dummyMapping; /** @var Rule[] */ - private $rules = []; + private array $rules = []; protected function setUp(): void { parent::setUp(); @@ -81,7 +75,7 @@ private function createMapping(string $id): IUserMapping { return $mapping; } - private function getAclManager(bool $perUserMerge = false) { + private function getAclManager(bool $perUserMerge = false): ACLManager { $rootMountPoint = $this->createMock(IMountPoint::class); $rootMountPoint->method('getNumericStorageId') ->willReturn(1); @@ -94,12 +88,12 @@ private function getAclManager(bool $perUserMerge = false) { }, null, $perUserMerge); } - public function testGetACLPermissionsForPathNoRules() { + public function testGetACLPermissionsForPathNoRules(): void { $this->rules = []; $this->assertEquals(Constants::PERMISSION_ALL, $this->aclManager->getACLPermissionsForPath('foo')); } - public function testGetACLPermissionsForPath() { + public function testGetACLPermissionsForPath(): void { $this->rules = [ 'foo' => [ new Rule($this->createMapping('1'), 10, Constants::PERMISSION_READ + Constants::PERMISSION_UPDATE, Constants::PERMISSION_READ), // read only @@ -125,7 +119,7 @@ public function testGetACLPermissionsForPath() { $this->assertEquals(Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE - Constants::PERMISSION_UPDATE - Constants::PERMISSION_READ, $this->aclManager->getACLPermissionsForPath('foo/blocked2')); } - public function testGetACLPermissionsForPathInTrashbin() { + public function testGetACLPermissionsForPathInTrashbin(): void { $this->rules = [ '__groupfolders/1' => [ new Rule($this->dummyMapping, 10, Constants::PERMISSION_READ + Constants::PERMISSION_UPDATE, Constants::PERMISSION_READ), // read only @@ -155,7 +149,7 @@ public function testGetACLPermissionsForPathInTrashbin() { - public function testGetACLPermissionsForPathPerUserMerge() { + public function testGetACLPermissionsForPathPerUserMerge(): void { $aclManager = $this->getAclManager(true); $this->rules = [ 'foo' => [