diff --git a/application/src/Entity/Meta/Relation.php b/application/src/Entity/Meta/Relation.php index 9b882dd..9d50c31 100644 --- a/application/src/Entity/Meta/Relation.php +++ b/application/src/Entity/Meta/Relation.php @@ -14,8 +14,7 @@ use Doctrine\Common\Collections\Collection; /** * This class represents a relation. - * It allows a better right management of the meta informations. - * Also it is used to capsel the logic relation to an own logical unit. + * A relationship represents the creators and the created objects. * * @author kevinfrantz * diff --git a/application/tests/Unit/Entity/Meta/RelationTest.php b/application/tests/Unit/Entity/Meta/RelationTest.php new file mode 100644 index 0000000..f8d6508 --- /dev/null +++ b/application/tests/Unit/Entity/Meta/RelationTest.php @@ -0,0 +1,28 @@ +relation = new Relation(); + } + + public function testConstructor():void { + $this->assertInstanceOf(Collection::class, $this->relation->getChilds()); + $this->assertInstanceOf(Collection::class, $this->relation->getParents()); + $this->expectException(\TypeError::class); + $this->relation->getSource(); + } +} +