function WorkspaceEntityOperationsTest::setUp
Overrides KernelTestBase::setUp
File
-
core/
modules/ workspaces/ tests/ src/ Kernel/ WorkspaceEntityOperationsTest.php, line 43
Class
- WorkspaceEntityOperationsTest
- Tests entity operations with workspaces.
Namespace
Drupal\Tests\workspaces\KernelCode
protected function setUp() : void {
parent::setUp();
$this->entityTypeManager = \Drupal::entityTypeManager();
$this->workspaceManager = \Drupal::service('workspaces.manager');
$this->installEntitySchema('entity_test_mulrevpub');
$this->installEntitySchema('workspace');
$this->installSchema('workspaces', [
'workspace_association',
'workspace_association_revision',
]);
$this->installConfig([
'system',
]);
$this->setUpCurrentUser([], [
'create workspace',
'view any workspace',
'edit any workspace',
'delete any workspace',
]);
$this->workspaces['stage'] = Workspace::create([
'id' => 'stage',
'label' => 'Stage',
]);
$this->workspaces['stage']
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.