You are here

protected function ProductVariationAccessTest::setUp in Commerce Core 8.2

Overrides CommerceKernelTestBase::setUp

File

modules/product/tests/src/Kernel/ProductVariationAccessTest.php, line 38

Class

ProductVariationAccessTest
Tests the product variation access control.

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',
  ]);

  // Create uid: 1 here so that it's skipped in test cases.
  $admin_user = $this
    ->createUser();
  $regular_user = $this
    ->createUser([
    'uid' => 2,
  ]);
  \Drupal::currentUser()
    ->setAccount($regular_user);
}