You are here

public function ResponseTest::testIsSuccess in reCAPTCHA 7.2

Same name and namespace in other branches
  1. 6.2 recaptcha-php/tests/ReCaptcha/ResponseTest.php \ReCaptcha\ResponseTest::testIsSuccess()

File

recaptcha-php/tests/ReCaptcha/ResponseTest.php, line 95

Class

ResponseTest

Namespace

ReCaptcha

Code

public function testIsSuccess() {
  $response = new Response(true);
  $this
    ->assertTrue($response
    ->isSuccess());
  $response = new Response(false);
  $this
    ->assertFalse($response
    ->isSuccess());
  $response = new Response(true, array(), 'example.com');
  $this
    ->assertEquals('example.com', $response
    ->getHostName());
}