Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class GetSettlementsTest extends TestCase |
||
13 | { |
||
14 | use UsesConnectionTrait; |
||
15 | |||
16 | private Address $model; |
||
17 | |||
18 | protected function setUp(): void |
||
19 | { |
||
20 | $connection = $this->getConnection(); |
||
21 | $this->model = new Address($connection); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return void |
||
26 | * @throws NovaPoshtaApiException |
||
27 | */ |
||
28 | public function testGetSettlements(): void |
||
29 | { |
||
30 | $actualResult = $this->model->getSettlements(['FindByString' => 'Київ'], true, 1, 10); |
||
31 | $this->assertNotEmpty($actualResult); |
||
32 | $this->assertIsSettlement(array_shift($actualResult)); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param array $settlement |
||
37 | * @return void |
||
38 | */ |
||
39 | private function assertIsSettlement(array $settlement): void |
||
43 | } |
||
44 | } |
||
45 |