diff --git a/application/tests/Unit/Entity/Attribut/NameAttributTest.php b/application/tests/Unit/Entity/Attribut/NameAttributTest.php new file mode 100644 index 0000000..e939169 --- /dev/null +++ b/application/tests/Unit/Entity/Attribut/NameAttributTest.php @@ -0,0 +1,30 @@ +name = new class implements NameAttributInterface{ + use NameAttribut; + }; + } + + public function testConstructor():void{ + $this->expectException(\TypeError::class); + $this->name->getName(); + } + + public function testAccessors():void{ + $name = "hello world!"; + $this->assertNull($this->name->setName($name)); + $this->assertEquals($name, $this->name->getName()); + } +} +