You are here

protected function PaymentMethodAccessTest::setUp in Commerce Core 8.2

Overrides OrderKernelTestBase::setUp

File

modules/payment/tests/src/Kernel/PaymentMethodAccessTest.php, line 37

Class

PaymentMethodAccessTest
Tests the payment method access control.

Namespace

Drupal\Tests\commerce_payment\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('commerce_payment_method');
  $this
    ->installEntitySchema('commerce_payment');
  $this
    ->installConfig([
    'commerce_payment',
  ]);

  // 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);
}