/**
  * Execute the command.
  *
  * @param CountryRepository $countries
  * @return Country
  */
 public function handle(CountryRepository $countries)
 {
     $country = Country::register($this->iso_code_2, $this->name);
     $countries->save($country);
     return $country;
 }
示例#2
0
 function it_can_be_registered()
 {
     $country = Country::register('NL', 'Netherlands');
     \PHPUnit_Framework_Assert::assertEquals('NL', $country->iso_code_2);
     \PHPUnit_Framework_Assert::assertEquals('Netherlands', $country->name);
 }