TwoCaptchaReCaptchaTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRecaptcha() 0 15 1
1
<?php
2
3
/**
4
 * Class TwoCaptchaReCaptchaTest.
5
 */
6
class TwoCaptchaReCaptchaTest extends PHPUnit_Framework_TestCase
7
{
8
    public function testRecaptcha()
9
    {
10
        $captcha = new \jumper423\decaptcha\services\RuCaptchaReCaptcha([
11
            \jumper423\decaptcha\services\RuCaptchaReCaptcha::ACTION_FIELD_KEY => '200a1ed2b6ca001d8171c655658086ed',
12
        ]);
13
        $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU);
14
//        if ($captcha->recognize([
15
//            \jumper423\decaptcha\services\RuCaptchaReCaptcha::ACTION_FIELD_GOOGLEKEY => '6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5',
16
//            \jumper423\decaptcha\services\RuCaptchaReCaptcha::ACTION_FIELD_PAGEURL => 'https://patrickhlauke.github.io/recaptcha/',
17
//        ])) {
18
//            $this->assertEquals('111', $captcha->getCode());
19
//        } else {
20
//            $this->assertEquals('222', $captcha->getError());
21
//        }
22
    }
23
}
24