Dumplie\CustomerService\Domain\OrderId::generate PHP 메소드

generate() 공개 정적인 메소드

public static generate ( ) : OrderId
리턴 OrderId
    public static function generate() : OrderId
    {
        return new self((string) BaseUUID::uuid4());
    }

Usage Example

예제 #1
0
 function test_reject_payment()
 {
     $orderId = OrderId::generate();
     $this->customerServiceContext->customerPlacedOrder((string) $orderId);
     $paymentId = $this->customerServiceContext->createPaymentFor($orderId);
     $command = new RejectPayment((string) $paymentId);
     $this->customerServiceContext->commandBus()->handle($command);
     $this->clear();
     $payment = $this->customerServiceContext->payments()->getById($paymentId);
     $this->assertTrue($payment->isRejected());
 }
All Usage Examples Of Dumplie\CustomerService\Domain\OrderId::generate
OrderId