requestAttribut = new class() implements RequestAttributInterface { use RequestAttribut; }; } public function testConstruct(): void { $this->expectException(\TypeError::class); $this->requestAttribut->getRequest(); } public function testAccessors(): void { $request = $this->createMock(Request::class); $this->assertNull($this->requestAttribut->setRequest($request)); $this->assertEquals($request, $this->requestAttribut->getRequest()); } }