/** * @dataProvider provideJson */ public function testFromJson($json, $success, $error) { $response = Response::parseJson($json); $this->assertEquals($success, $response->isSuccess()); $this->assertEquals($error, $response->getError()); }
/** * @return Response */ public function verify() { $params = new RequestParameters($this->secret, $this->captchaId, $this->captchaValue); $rawResponse = $this->requestMethod->submit($params); return Response::parseJson($rawResponse); }