Passed
Push — master ( 77fbef...5b00d5 )
by Sergey
02:50 queued 35s
created

SearchSettlementStreetsTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SergeyNezbritskiy\Tests\Integration\Models\Address;
6
7
use PHPUnit\Framework\TestCase;
8
use SergeyNezbritskiy\NovaPoshta\Models\Address;
9
use SergeyNezbritskiy\NovaPoshta\NovaPoshtaApiException;
10
use SergeyNezbritskiy\NovaPoshta\Tests\UsesConnectionTrait;
11
12
class SearchSettlementStreetsTest extends TestCase
13
{
14
    use UsesConnectionTrait;
15
16
    private const CITY_REF = 'db5c88e0-391c-11dd-90d9-001a92567626';
17
    private Address $model;
18
19
    protected function setUp(): void
20
    {
21
        $connection = $this->getConnection();
22
        $this->model = new Address($connection);
23
    }
24
25
    /**
26
     * @return void
27
     * @throws NovaPoshtaApiException
28
     */
29
    public function testSearchSettlementStreets(): void
30
    {
31
        $actualResult = $this->model->searchSettlementStreets('Чернишевського', self::CITY_REF);
32
        $this->assertArrayHasKey('TotalCount', $actualResult);
33
        $this->assertArrayHasKey('Addresses', $actualResult);
34
    }
35
}
36