| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 13 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | View Code Duplication | public function testEnum() |
|
|
1 ignored issue
–
show
|
|||
| 22 | { |
||
| 23 | $captcha = new \jumper423\decaptcha\services\Anticaptcha([ |
||
| 24 | \jumper423\decaptcha\services\Anticaptcha::PARAM_SPEC_API_KEY => '5464654645646', |
||
| 25 | \jumper423\decaptcha\services\Anticaptcha::ACTION_FIELD_LANGUAGE => 'ru', |
||
| 26 | ]); |
||
| 27 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
||
| 28 | if ($captcha->recognize(__DIR__ . '/data/Captcha.jpg')) { |
||
| 29 | $this->assertEquals('11111111111111', $captcha->getCode()); |
||
| 30 | } else { |
||
| 31 | $this->assertEquals('Нет в допустимых значиниях поля: languagePool = ru', $captcha->getError()); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.