Dumplie\CustomerService\Tests\Integration\Application\Generic\PaymentTestCase::test_create_payment PHP 메소드

test_create_payment() 공개 메소드

public test_create_payment ( )
    function test_create_payment()
    {
        $orderId = OrderId::generate();
        $paymentId = PaymentId::generate();
        $this->customerServiceContext->customerPlacedOrder((string) $orderId);
        $command = new CreatePayment((string) $orderId, (string) $paymentId);
        $this->customerServiceContext->commandBus()->handle($command);
        $this->clear();
        $payment = $this->customerServiceContext->payments()->getById($paymentId);
        $this->assertFalse($payment->isPaid());
        $this->assertFalse($payment->isRejected());
    }