diff --git a/application/src/Entity/Meta/AbstractMeta.php b/application/src/Entity/Meta/AbstractMeta.php index c51692b..9958107 100644 --- a/application/src/Entity/Meta/AbstractMeta.php +++ b/application/src/Entity/Meta/AbstractMeta.php @@ -9,7 +9,8 @@ use App\Entity\AbstractEntity; */ abstract class AbstractMeta extends AbstractEntity implements MetaInterface { - public function __construct(){ + public function __construct() + { parent::__construct(); } } diff --git a/application/tests/unit/Entity/Meta/LawTest.php b/application/tests/unit/Entity/Meta/LawTest.php new file mode 100644 index 0000000..83d1e27 --- /dev/null +++ b/application/tests/unit/Entity/Meta/LawTest.php @@ -0,0 +1,33 @@ +law = new Law(); + } + + public function testConstruct(): void + { + $this->assertInstanceOf(Collection::class, $this->law->getRights()); + } + + public function testRights(): void + { + $right = new Right(); + $rights = new ArrayCollection([$right, new Right(), new Right()]); + $this->assertNull($this->law->setRights($rights)); + $this->assertEquals($right, $this->law->getRights()->get(0)); + } +}