public function __construct(string $affiliateId, string $country, string $language = null, \Careerjet_API $api = null) { $this->affiliateId = $affiliateId; $this->country = $country; $this->language = $language; $this->api = !empty($api) ? $api : new \Careerjet_API(Locale::byCountryAndLanguage($country, $language)); }
/** * @dataProvider localeDataProvider * @param $country * @param $language * @param $locale */ public function testLocales($country, $language, $locale) { $this->assertEquals($locale, Locale::byCountryAndLanguage($country, $language)); }