public function testEmptyResponse() { $request = new Request(ReCaptcha::$siteVerifyUrl, new TestDriver(true, true)); $response = $request->send(); $this->assertInstanceOf('DS\\Library\\ReCaptcha\\Http\\Response', $response); $this->assertFalse($response->isSuccess()); }
/** * @param DriverInterface $driver * @return Request */ public function buildRequest(DriverInterface $driver = null) { $this->request = new Request(self::$siteVerifyUrl, $driver); return $this->request->setParameters(array('secret' => $this->secret, 'remoteip' => $this->clientIp, 'v' => $this->version, 'response' => $this->gReCaptchaResponse)); }