You are here

protected function OrderKernelTestBase::setUp in Commerce Core 8.2

Overrides CommerceKernelTestBase::setUp

61 calls to OrderKernelTestBase::setUp()
AddressBookTest::setUp in modules/order/tests/src/Kernel/AddressBookTest.php
AdjustmentItemTest::setUp in modules/order/tests/src/Kernel/AdjustmentItemTest.php
AdjustmentTransformerTest::setUp in modules/order/tests/src/Kernel/AdjustmentTransformerTest.php
BuyXGetYTest::setUp in modules/promotion/tests/src/Kernel/Plugin/Commerce/PromotionOffer/BuyXGetYTest.php
CanadianSalesTaxTest::setUp in modules/tax/tests/src/Kernel/Plugin/Commerce/TaxType/CanadianSalesTaxTest.php

... See full list

61 methods override OrderKernelTestBase::setUp()
AddressBookTest::setUp in modules/order/tests/src/Kernel/AddressBookTest.php
AdjustmentItemTest::setUp in modules/order/tests/src/Kernel/AdjustmentItemTest.php
AdjustmentTransformerTest::setUp in modules/order/tests/src/Kernel/AdjustmentTransformerTest.php
BuyXGetYTest::setUp in modules/promotion/tests/src/Kernel/Plugin/Commerce/PromotionOffer/BuyXGetYTest.php
CanadianSalesTaxTest::setUp in modules/tax/tests/src/Kernel/Plugin/Commerce/TaxType/CanadianSalesTaxTest.php

... See full list

File

modules/order/tests/src/Kernel/OrderKernelTestBase.php, line 32

Class

OrderKernelTestBase
Provides a base class for order kernel tests.

Namespace

Drupal\Tests\commerce_order\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  PhpUnitComparatorFactory::getInstance()
    ->register(new AdjustmentComparator());
  $this
    ->installEntitySchema('profile');
  $this
    ->installEntitySchema('commerce_order');
  $this
    ->installEntitySchema('commerce_order_item');
  $this
    ->installEntitySchema('commerce_product');
  $this
    ->installEntitySchema('commerce_product_variation');
  $this
    ->installConfig([
    'commerce_product',
    'commerce_order',
  ]);
  $this
    ->installSchema('commerce_number_pattern', [
    'commerce_number_pattern_sequence',
  ]);

  // An order item type that doesn't need a purchasable entity.
  OrderItemType::create([
    'id' => 'test',
    'label' => 'Test',
    'orderType' => 'default',
  ])
    ->save();
}