コード例 #1
0
 public function testItReturnsNullForCountryCodeWhenNotCountry()
 {
     $location = Location::makeFromArray(['id' => 32000006, 'name' => 'International', 'isCountry' => false]);
     $this->assertEquals(false, $location->isCountry());
     $this->assertNull($location->countryCode());
 }
コード例 #2
0
 /**
  * Get list of all locations
  *
  * @return array
  */
 public function getLocations()
 {
     return array_map(function ($item) {
         return Location::makeFromArray($item);
     }, $this->request('locations')['items']);
 }