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