Code Duplication    Length = 12-12 lines in 2 locations

tests/AnticaptchaTest.php 1 location

@@ 8-19 (lines=12) @@
5
 */
6
class AnticaptchaTest extends PHPUnit_Framework_TestCase
7
{
8
    public function testRecognize()
9
    {
10
        $captcha = new \jumper423\decaptcha\services\Anticaptcha([
11
            \jumper423\decaptcha\services\Anticaptcha::PARAM_SPEC_API_KEY => '5464654645646',
12
        ]);
13
        $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU);
14
        if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) {
15
            $this->assertEquals('11111111111111', $captcha->getCode());
16
        } else {
17
            $this->assertEquals('Использован несуществующий key', $captcha->getError());
18
        }
19
    }
20
}
21

tests/TwoCaptchaTest.php 1 location

@@ 23-34 (lines=12) @@
20
        $captcha->recognize(__DIR__.'/data/Captcha.jpg');
21
    }
22
23
    public function testRecognizeBalanceError2()
24
    {
25
        $captcha = new \jumper423\decaptcha\services\TwoCaptcha([
26
            \jumper423\decaptcha\services\TwoCaptcha::PARAM_SPEC_API_KEY => '200a1ed2b6ca001d8171c655658086ed',
27
        ]);
28
        $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU);
29
        if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) {
30
            $this->assertEquals('11111111111111', $captcha->getCode());
31
        } else {
32
            $this->assertEquals('Нулевой либо отрицательный баланс', $captcha->getError());
33
        }
34
    }
35
36
    public function testGetBalance()
37
    {