From 15b17c28b797778d3bc87fb3bb033e16bcae70de Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 4 Nov 2018 23:58:14 +0100 Subject: [PATCH] Implemented tests for attribut reciever --- .../Entity/Attribut/RecieverAttributTest.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 application/tests/Unit/Entity/Attribut/RecieverAttributTest.php diff --git a/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php b/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php new file mode 100644 index 0000000..ce0dcde --- /dev/null +++ b/application/tests/Unit/Entity/Attribut/RecieverAttributTest.php @@ -0,0 +1,34 @@ +reciever = new class implements RecieverAttributInterface{ + use RecieverAttribut; + }; + } + + public function testConstructor():void{ + $this->expectException(\TypeError::class); + $this->reciever->getReciever(); + } + + public function testAccessors():void{ + $reciever = $this->createMock(RecieverInterface::class); + $this->assertNull($this->reciever->setReciever($reciever)); + $this->assertEquals($reciever, $this->reciever->getReciever()); + } +} +