Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class GetStreetTest extends TestCase |
||
13 | { |
||
14 | use UsesConnectionTrait; |
||
15 | |||
16 | /** |
||
17 | * Kharkiv city ref |
||
18 | */ |
||
19 | private const CITY_REF = 'db5c88e0-391c-11dd-90d9-001a92567626'; |
||
20 | private Address $model; |
||
21 | |||
22 | protected function setUp(): void |
||
23 | { |
||
24 | $connection = $this->getConnection(); |
||
25 | $this->model = new Address($connection); |
||
26 | } |
||
27 | |||
28 | |||
29 | /** |
||
30 | * @return void |
||
31 | * @throws NovaPoshtaApiException |
||
32 | */ |
||
33 | public function testGetStreet(): void |
||
34 | { |
||
35 | $actualResult = $this->model->getStreet(self::CITY_REF, 'Черниш', 1, 10); |
||
36 | $this->assertIsArray($actualResult); |
||
37 | $this->assertIsStreet(array_shift($actualResult)); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param array $street |
||
42 | * @return void |
||
43 | */ |
||
44 | private function assertIsStreet(array $street): void |
||
50 | } |
||
51 | } |
||
52 |