You are here

protected function ProductVariationStorageTest::setUp in Commerce Core 8.2

Overrides CommerceKernelTestBase::setUp

File

modules/product/tests/src/Kernel/ProductVariationStorageTest.php, line 37

Class

ProductVariationStorageTest
Tests the product variation storage.

Namespace

Drupal\Tests\commerce_product\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('commerce_product_variation');
  $this
    ->installEntitySchema('commerce_product');
  $this
    ->installConfig([
    'commerce_product',
  ]);
  $this->variationStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('commerce_product_variation');
  $user = $this
    ->createUser([], [
    'administer commerce_product',
  ]);
  $this->container
    ->get('current_user')
    ->setAccount($user);
}