Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Update RegionsRequestTest to use an ISO country code
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Mar 19, 2019
1 parent ae013ff commit dde974f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/Integration/RegionsRequestTest.php
Expand Up @@ -42,7 +42,7 @@ class RegionsRequestTest extends TestCase
public function test_example()
{
$request = new RegionsRequest();
$request->setCountryCode(1);
$request->setCountryCode('RU');
$request->setPage(0)->setSize(1);

$response = $this->getClient()->sendRegionsRequest($request);
Expand All @@ -53,6 +53,11 @@ public function test_example()
$this->assertCount(1, $response->getItems());

$region = $response->getItems()[0];

if ($region->getCountryCode() === 0) {
$this->markTestSkipped("Unknown country: {$region->getCountryName()}");
}

$this->assertSame('18aff43f-58b8-4608-ade7-92fdab7fc39f', $region->getUuid());
$this->assertSame('Тверская', $region->getName());
$this->assertSame('обл', $region->getPrefix());
Expand Down

0 comments on commit dde974f

Please sign in to comment.