/** * Get stock country * * @return mixed */ public function country() { if ($this->country) { return $this->country; } $this->country = Country::random(); $this->currency = Currency::get($this->country); return $this->country; }
/** * @test * @expectedException InvalidArgumentException */ public function throw_exception_if_wrong_country_code_is_submitted() { $countryCode = Country::get('ZZ'); }