コード例 #1
0
 public function testGetters()
 {
     $this->assertSame('Pending', OrderStatusType::pending()->getName());
     $this->assertSame('Processing', OrderStatusType::processing()->getName());
     $this->assertSame('Partially Shipped', OrderStatusType::partiallyShipped()->getName());
     $this->assertSame('Shipped', OrderStatusType::shipped()->getName());
     $this->assertSame('Complete', OrderStatusType::complete()->getName());
     $this->assertSame('Canceled', OrderStatusType::canceled()->getName());
 }
コード例 #2
0
ファイル: Order.php プロジェクト: inklabs/kommerce-core
 private function setOrderShippedStatus()
 {
     if ($this->isFullyShipped()) {
         $this->setStatus(OrderStatusType::shipped());
     } else {
         $this->setStatus(OrderStatusType::partiallyShipped());
     }
 }