예제 #1
0
 function it_can_be_registered()
 {
     $supplier = Supplier::register('Acme Logistics');
     \PHPUnit_Framework_Assert::assertEquals('Acme Logistics', $supplier->name);
 }
예제 #2
0
 /**
  * Execute the command.
  *
  * @param SupplierRepository $suppliers
  * @return Supplier
  */
 public function handle(SupplierRepository $suppliers)
 {
     $supplier = Supplier::register($this->name);
     $suppliers->save($supplier);
     return $supplier;
 }