You are here

public function OrderTypeTest::testOrderTypeDependencies in Commerce Core 8.2

Tests order type dependencies.

File

modules/order/tests/src/Functional/OrderTypeTest.php, line 141

Class

OrderTypeTest
Tests the order type UI.

Namespace

Drupal\Tests\commerce_order\Functional

Code

public function testOrderTypeDependencies() {
  $this
    ->drupalGet('admin/commerce/config/order-types/default/edit');
  $this
    ->submitForm([
    'workflow' => 'test_workflow',
  ], t('Save'));
  $order_type = OrderType::load('default');
  $this
    ->assertEquals('test_workflow', $order_type
    ->getWorkflowId());
  $dependencies = $order_type
    ->getDependencies();
  $this
    ->assertArrayHasKey('module', $dependencies);
  $this
    ->assertContains('commerce_order_test', $dependencies['module']);
}