id = new class() implements IdAttributInterface { use IdAttribut; }; } public function testConstruct(): void { $this->expectException(\TypeError::class); $this->id->getId(); } public function testAccessors(): void { $id = 1234; $this->assertNull($this->id->setId($id)); $this->assertEquals($id, $this->id->getId()); } }