protected function PluginItemTest::setUp in Commerce Core 8.2
Overrides CommerceKernelTestBase::setUp
File
- tests/
src/ Kernel/ PluginItemTest.php, line 32
Class
- PluginItemTest
- Tests the 'commerce_plugin_item' field type.
Namespace
Drupal\Tests\commerce\KernelCode
protected function setUp() : void {
parent::setUp();
Role::create([
'id' => 'test_role',
'name' => $this
->randomString(),
])
->save();
$field_storage = FieldStorageConfig::create([
'field_name' => 'test_conditions',
'entity_type' => 'entity_test',
'type' => 'commerce_plugin_item:commerce_condition',
]);
$field_storage
->save();
$field = FieldConfig::create([
'field_name' => 'test_conditions',
'entity_type' => 'entity_test',
'bundle' => 'entity_test',
]);
$field
->save();
}