exception = new RequestFailedException(new Exception('Foo'), new EsiResponse( json_encode(['error' => 'test']), [], 'now', 500 )); } public function testRequestFailedGetsErrors() { $error = $this->exception->getError(); $this->assertEquals('test', $error); } public function testRequestFailedGetsEsiResponse() { $response = $this->exception->getEsiResponse(); $this->assertInstanceOf(EsiResponse::class, $response); } public function testRequestFailedGetsOriginalException() { $response = $this->exception->getOriginalException(); $this->assertInstanceOf(Exception::class, $response); } }