-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from alldigitalrewards/DS-3439
DS-3439 extend country mapping methods to get approved country list a…
- Loading branch information
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace AllDigitalRewards\Tests; | ||
|
||
use AllDigitalRewards\CountryMapper\CountryMapping; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ApprovedCountryTest extends TestCase | ||
{ | ||
public function testArrayOfApprovedCountries() | ||
{ | ||
$approvedList = ['US', 'CA', 'MX', 'ES', 'DE', 'IN', 'JP', 'KR', 'IT', 'MY', 'NL', 'BR', 'RU', 'CN']; | ||
$countries = (new CountryMapping())->getApprovedCountryList(); | ||
$this->assertSame($approvedList, $countries); | ||
} | ||
|
||
public function testApprovedCountryReturnsFalse() | ||
{ | ||
$this->assertFalse((new CountryMapping())->isApprovedCountry('AL')); | ||
} | ||
|
||
public function testApprovedCountryReturnsTrue() | ||
{ | ||
$this->assertTrue((new CountryMapping())->isApprovedCountry('RU')); | ||
} | ||
} |