diff --git a/application/tests/Unit/Entity/Attribut/NameSourceAttributTest.php b/application/tests/Unit/Entity/Attribut/NameSourceAttributTest.php new file mode 100644 index 0000000..828a0ba --- /dev/null +++ b/application/tests/Unit/Entity/Attribut/NameSourceAttributTest.php @@ -0,0 +1,36 @@ +name = new class() implements NameSourceAttributInterface { + use NameSourceAttribut; + }; + } + + public function testConstructor(): void + { + $this->expectException(\TypeError::class); + $this->name->getNameSource(); + } + + public function testAccessors(): void + { + $nameSource = $this->createMock(NameSourceInterface::class); + $this->assertNull($this->name->setNameSource($nameSource)); + $this->assertEquals($nameSource, $this->name->getNameSource()); + } +}