Beispiel #1
0
 /**
  * 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;
 }
Beispiel #2
0
 /**
  * @test
  */
 public function static_method_random_provides_a_random_country_code()
 {
     $countryCode = Country::random();
     $this->assertEquals(2, strlen($countryCode));
 }