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