name = new class() implements FirstNameSourceAttributInterface { use FirstNameSourceAttribut; }; } public function testConstructor(): void { $this->expectException(\TypeError::class); $this->name->getFirstNameSource(); } public function testAccessors(): void { $name = $this->createMock(FirstNameSourceInterface::class); $this->assertNull($this->name->setFirstNameSource($name)); $this->assertEquals($name, $this->name->getFirstNameSource()); } }