| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class GetStreetTest 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 testGetStreet(): void |
||
| 30 | { |
||
| 31 | $actualResult = $this->model->getStreet(self::CITY_REF_KHARKIV, 'Черниш', 1, 10); |
||
| 32 | $this->assertIsArray($actualResult); |
||
| 33 | $this->assertIsStreet(array_shift($actualResult)); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $street |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | private function assertIsStreet(array $street): void |
||
| 46 | } |
||
| 47 | } |
||
| 48 |