testSearchSettlementStreets()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SergeyNezbritskiy\NovaPoshta\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\ConstantsInterface;
11
use SergeyNezbritskiy\NovaPoshta\Tests\UsesConnectionTrait;
12
13
class SearchSettlementStreetsTest extends TestCase implements ConstantsInterface
14
{
15
    use UsesConnectionTrait;
16
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_KHARKIV);
32
        $this->assertArrayHasKey('TotalCount', $actualResult);
33
        $this->assertArrayHasKey('Addresses', $actualResult);
34
    }
35
}
36