You are here

protected function LicenseRoleTypeTest::setUp in Commerce License 8.2

Overrides OrderKernelTestBase::setUp

File

tests/src/Kernel/LicenseRoleTypeTest.php, line 49

Class

LicenseRoleTypeTest
Tests the role license type.

Namespace

Drupal\Tests\commerce_license\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('commerce_license');

  // Install the bundle plugins for the license entity type which this
  // module provides. This takes care of creating the fields which the bundle
  // plugins define.
  $this->container
    ->get('entity.bundle_plugin_installer')
    ->installBundles($this->container
    ->get('entity_type.manager')
    ->getDefinition('commerce_license'), [
    'commerce_license',
  ]);
  $this->licenseTypeManager = $this->container
    ->get('plugin.manager.commerce_license_type');
  $this->licenseStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('commerce_license');
  $this->roleStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('user_role');
}