fullname = new class() implements FullPersonNameSourceAttributInterface { use FullPersonNameSourceAttribut; }; } public function testConstructor(): void { $this->expectException(\TypeError::class); $this->fullname->getFullPersonNameSource(); } public function testAccessors(): void { $fullname = $this->createMock(FullPersonNameSourceInterface::class); $this->assertNull($this->fullname->setFullPersonNameSource($fullname)); $this->assertEquals($fullname, $this->fullname->getFullPersonNameSource()); } }