Passed
Push — master ( 0bf537...7324f0 )
by Nikita
01:33
created

EgrulTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 42
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testLegal() 0 40 1
1
<?php
2
3
namespace nikserg\CRMCertificateAPI\tests;
4
5
use nikserg\CRMCertificateAPI\models\response\Esia\Egrul;
6
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class EgrulTest extends TestCase
9
{
10
    public function testLegal()
11
    {
12
        $egrul = new Egrul(json_decode('{
13
    "id": 1228721,
14
    "type": "egrul",
15
    "status": 2,
16
    "comment": "Выписка ЕГРЮЛ получена #1228721",
17
    "created": "2020-11-24 12:55:06",
18
    "data": {
19
        "organizationShortName": "ООО \"ИТК\"",
20
        "organizationFullName": "ОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ \"ИНТЕРНЕТ ТЕХНОЛОГИИ И КОММУНИКАЦИИ\"",
21
        "OGRN": "1112310000220",
22
        "INN": "2310152134",
23
        "KPP": "230801001",
24
        "fiasAddress": "КРАЙ КРАСНОДАРСКИЙ, ГОРОД КРАСНОДАР, УЛИЦА ДАЛЬНЯЯ, ДОМ 39/3, ПОМЕЩЕНИЕ 140",
25
        "rawParticipators": [
26
            "  ",
27
            "  ",
28
            "  "
29
        ],
30
        "rawRegion": "КРАЙ КРАСНОДАРСКИЙ",
31
        "rawCity": "КРАСНОДАР",
32
        "rawOffice": "ПОМЕЩЕНИЕ 140",
33
        "rawHouse": "ДОМ 39/3",
34
        "rawStreet": "УЛИЦА ДАЛЬНЯЯ",
35
        "postcode": "350051",
36
        "region": "23 Краснодарский край",
37
        "city": "Краснодар",
38
        "street": "УЛИЦА ДАЛЬНЯЯ, ДОМ 39/3, ПОМЕЩЕНИЕ 140",
39
        "headLastName": "Сорокин",
40
        "headFirstName": "Дмитрий",
41
        "headMiddleName": "Викторович",
42
        "headPosition": "Генеральный директор"
43
    }
44
}'));
45
        $this->assertEquals('УЛИЦА ДАЛЬНЯЯ, ДОМ 39/3, ПОМЕЩЕНИЕ 140', $egrul->address->street);
46
        $this->assertEquals('Краснодар', $egrul->address->city);
47
        $this->assertEquals('230801001', $egrul->kpp);
48
        $this->assertEquals('2310152134', $egrul->inn);
49
        $this->assertEquals('1112310000220', $egrul->ogrn);
50
    }
51
}