parentRelationAttribut = new class() implements ParentRelationAttributInterface { use ParentRelationAttribut; }; } public function testAccessors(): void { $relation = $this->createMock(ParentRelationInterface::class); $this->assertNull($this->parentRelationAttribut->setParentRelation($relation)); $this->assertEquals($relation, $this->parentRelationAttribut->getParentRelation()); } }