From e28f17b88e385298b843a3609dd1d6a8dd9196c1 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 4 Nov 2018 13:19:35 +0100 Subject: [PATCH] Implemented parents attribut test --- .../Entity/Attribut/ParentsAttributTest.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 application/tests/Unit/Entity/Attribut/ParentsAttributTest.php diff --git a/application/tests/Unit/Entity/Attribut/ParentsAttributTest.php b/application/tests/Unit/Entity/Attribut/ParentsAttributTest.php new file mode 100644 index 0000000..e37495b --- /dev/null +++ b/application/tests/Unit/Entity/Attribut/ParentsAttributTest.php @@ -0,0 +1,36 @@ +parents = new class() implements ParentsAttributInterface { + use ParentsAttribut; + }; + } + + public function testConstructor(): void + { + $this->expectException(\TypeError::class); + $this->parents->getParents(); + } + + public function testAccessors(): void + { + $parents = new ArrayCollection(); + $this->assertNull($this->parents->setParents($parents)); + $this->assertEquals($parents, $this->parents->getParents()); + } +}