Completed
Push — master ( dcb8b5...4e6023 )
by Владислав
01:56
created

DeCaptchaErrorsTest::testNotConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use \jumper423\decaptcha\core\DeCaptchaErrors;
4
5
class DeCaptchaErrorsTest extends PHPUnit_Framework_TestCase
1 ignored issue
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
{
7
    /**
8
     * @expectedException \jumper423\decaptcha\core\DeCaptchaErrors
9
     * @expectedExceptionMessage Вы должны слать параметр method в вашем запросе к API, изучите документацию
10
     * @expectedExceptionCode 7
11
     */
12
    public function testErrorNoSuchMethod()
13
    {
14
        throw new DeCaptchaErrors('ERROR_NO_SUCH_METHOD', null, DeCaptchaErrors::LANG_RU);
15
    }
16
17
    /**
18
     * @expectedException \jumper423\decaptcha\core\DeCaptchaErrors
19
     * @expectedExceptionMessage Ваша капча имеет размер более 100 килобайт: вес файла 5 МБ
20
     * @expectedExceptionCode 2
21
     */
22
    public function testErrorTooBigCaptchaFilesize()
23
    {
24
        throw new DeCaptchaErrors('ERROR_TOO_BIG_CAPTCHA_FILESIZE', 'вес файла 5 МБ', DeCaptchaErrors::LANG_RU);
25
    }
26
27
    /**
28
     * @expectedException \jumper423\decaptcha\core\DeCaptchaErrors
29
     * @expectedExceptionMessage NOT_CONFIG
30
     * @expectedExceptionCode 0
31
     */
32
    public function testNotConfig()
33
    {
34
        throw new DeCaptchaErrors('NOT_CONFIG');
35
    }
36
37
    /**
38
     * @expectedException \jumper423\decaptcha\core\DeCaptchaErrors
39
     * @expectedExceptionMessage ERROR Code №1555
40
     * @expectedExceptionCode 1555
41
     */
42
    public function testNotConfigNumber()
43
    {
44
        throw new DeCaptchaErrors(1555);
45
    }
46
}