protected function LicenseGrantSetFieldTest::setUp in Commerce License 8.2
Overrides OrderKernelTestBase::setUp
File
- tests/
src/ Kernel/ LicenseGrantSetFieldTest.php, line 43
Class
- LicenseGrantSetFieldTest
- Tests the a field can be set on the license when granted and revoked.
Namespace
Drupal\Tests\commerce_license\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_license');
// Install the bundle plugins for the license entity type which the
// commerce_license_test 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_test',
]);
$this->licenseTypeManager = $this->container
->get('plugin.manager.commerce_license_type');
$this->licenseStorage = $this->container
->get('entity_type.manager')
->getStorage('commerce_license');
}