You are here

public function CheckoutOrderManagerTest::testGetCheckoutFlow in Commerce Core 8.2

Tests getting the order's checkout flow.

File

modules/checkout/tests/src/Kernel/CheckoutOrderManagerTest.php, line 80

Class

CheckoutOrderManagerTest
Tests the checkout order manager.

Namespace

Drupal\Tests\commerce_checkout\Kernel

Code

public function testGetCheckoutFlow() {
  $checkout_flow = $this->checkoutOrderManager
    ->getCheckoutFlow($this->order);
  $this
    ->assertInstanceOf(CheckoutFlow::class, $checkout_flow);
  $this
    ->assertEquals('default', $checkout_flow
    ->id());
  $this->order->checkout_flow->target_id = 'deleted';
  $checkout_flow = $this->checkoutOrderManager
    ->getCheckoutFlow($this->order);
  $this
    ->assertInstanceOf(CheckoutFlow::class, $checkout_flow);
  $this
    ->assertEquals('default', $checkout_flow
    ->id());
}