public function ResponseTest::testToArray in reCAPTCHA 7.2
File
- recaptcha-php/
tests/ ReCaptcha/ ResponseTest.php, line 151
Class
Namespace
ReCaptchaCode
public function testToArray() {
$response = new Response(true, array(), 'hostname', 'timestamp', 'apk', '0.5', 'homepage');
$expected = array(
'success' => true,
'error-codes' => array(),
'hostname' => 'hostname',
'challenge_ts' => 'timestamp',
'apk_package_name' => 'apk',
'score' => 0.5,
'action' => 'homepage',
);
$this
->assertEquals($expected, $response
->toArray());
}