right = new Right(); } public function testConstructor(): void { $this->assertEquals($this->right,$this->right->getReciever()->getRight()); $this->expectException(\TypeError::class); $this->assertNull($this->right->getLaw()); $this->expectException(\TypeError::class); $this->assertNull($this->right->getType()); } public function testLaw(): void { $law = new Law(); $this->assertNull($this->right->setLaw($law)); $this->assertEquals($law, $this->right->getLaw()); } public function testRight(): void { $this->assertNull($this->right->setType(RightType::READ)); $this->assertEquals(RightType::READ, $this->right->getType()); } }