memberRelation = new class() implements MemberRelationAttributInterface { use MemberRelationAttribut; }; } public function testConstructor(): void { $this->expectException(\TypeError::class); $this->memberRelation->getMemberRelation(); } public function testAccessors(): void { $membership = $this->createMock(MemberRelationInterface::class); $this->assertNull($this->memberRelation->setMemberRelation(new ArrayCollection([$membership]))); $this->assertEquals($this->memberRelation->getMemberRelation()->get(0), $membership); } }