Solved tests of MemberRelationAttribut

This commit is contained in:
Kevin Frantz 2018-11-26 22:30:08 +01:00
parent 67ef76b308
commit 68e8537ff1
3 changed files with 4 additions and 5 deletions

View File

@ -11,7 +11,7 @@ trait MemberRelationAttribut
*/ */
protected $memberRelation; protected $memberRelation;
public function setMembersRelation(MemberRelationInterface $memberRelation): void public function setMemberRelation(MemberRelationInterface $memberRelation): void
{ {
$this->memberRelation = $memberRelation; $this->memberRelation = $memberRelation;
} }

View File

@ -6,7 +6,7 @@ use App\Entity\Meta\Relation\Member\MemberRelationInterface;
interface MemberRelationAttributInterface interface MemberRelationAttributInterface
{ {
public function setMembersRelation(MemberRelationInterface $memberRelation): void; public function setMemberRelation(MemberRelationInterface $memberRelation): void;
public function getMemberRelation(): MemberRelationInterface; public function getMemberRelation(): MemberRelationInterface;
} }

View File

@ -3,7 +3,6 @@
namespace Tests\Unit\Entity\Attribut; namespace Tests\Unit\Entity\Attribut;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Attribut\MemberRelationAttributInterface; use App\Entity\Attribut\MemberRelationAttributInterface;
use App\Entity\Attribut\MemberRelationAttribut; use App\Entity\Attribut\MemberRelationAttribut;
use App\Entity\Meta\Relation\Member\MemberRelationInterface; use App\Entity\Meta\Relation\Member\MemberRelationInterface;
@ -31,7 +30,7 @@ class MemberRelationAttributTest extends TestCase
public function testAccessors(): void public function testAccessors(): void
{ {
$membership = $this->createMock(MemberRelationInterface::class); $membership = $this->createMock(MemberRelationInterface::class);
$this->assertNull($this->memberRelation->setMemberRelation(new ArrayCollection([$membership]))); $this->assertNull($this->memberRelation->setMemberRelation($membership));
$this->assertEquals($this->memberRelation->getMemberRelation()->get(0), $membership); $this->assertEquals($this->memberRelation->getMemberRelation(), $membership);
} }
} }