diff --git a/application/symfony/src/Attribut/RequestedRightAttribut.php b/application/symfony/src/Attribut/RequestedRightAttribut.php new file mode 100644 index 0000000..8cc49c9 --- /dev/null +++ b/application/symfony/src/Attribut/RequestedRightAttribut.php @@ -0,0 +1,34 @@ +requestedRight = $requestedRight; + } + + /** + * @return RequestedRightInterface + */ + public function getRequestedRight(): RequestedRightInterface + { + return $this->requestedRight; + } +} diff --git a/application/symfony/src/Attribut/RequestedRightAttributInterface.php b/application/symfony/src/Attribut/RequestedRightAttributInterface.php new file mode 100644 index 0000000..9d0b3d0 --- /dev/null +++ b/application/symfony/src/Attribut/RequestedRightAttributInterface.php @@ -0,0 +1,21 @@ +requestedRightAttribut = new class() implements RequestedRightAttributInterface { + use RequestedRightAttribut; + }; + } + + public function testConstructor(): void + { + $this->expectException(\TypeError::class); + $this->requestedRightAttribut->getRequestedRight(); + } + + public function testAccessors(): void + { + $requestedRight = $this->createMock(RequestedRightInterface::class); + $this->assertNull($this->requestedRightAttribut->setRequestedRight($requestedRight)); + $this->assertEquals($reciever, $this->requestedRightAttribut->getRequestedRight()); + } +}