コード例 #1
0
 /**
  * Execute the command.
  *
  * @param ProductTypeRepository $types
  * @return ProductType
  */
 public function handle(ProductTypeRepository $types)
 {
     $type = ProductType::register($this->description);
     $types->save($type);
     return $type;
 }
コード例 #2
0
ファイル: ProductTypeSpec.php プロジェクト: manishkiozen/Cms
 function it_can_be_registered()
 {
     $type = ProductType::register('Book');
     \PHPUnit_Framework_Assert::assertEquals('Book', $type->description);
 }