From 41c8f7cfdd75c52ee55a3a6137e9f4b226a863d2 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sat, 29 Dec 2018 23:23:06 +0100 Subject: [PATCH] Implemented TypeAttributTest --- .../Unit/Entity/Attribut/TypeAttributTest.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 application/tests/Unit/Entity/Attribut/TypeAttributTest.php diff --git a/application/tests/Unit/Entity/Attribut/TypeAttributTest.php b/application/tests/Unit/Entity/Attribut/TypeAttributTest.php new file mode 100644 index 0000000..e8d9751 --- /dev/null +++ b/application/tests/Unit/Entity/Attribut/TypeAttributTest.php @@ -0,0 +1,38 @@ +typeAttribut = new class() implements TypeAttributInterface { + use TypeAttribut; + }; + } + + public function testConstructor(): void + { + $this->expectException(\TypeError::class); + $this->typeAttribut->getType(); + } + + public function testAccessors(): void + { + $type = 'Hello World!'; + $this->assertNull($this->typeAttribut->setType($type)); + $this->assertEquals($type, $this->typeAttribut->getType()); + } +}