function WorkspaceFormPersistenceTest::setUp
Overrides KernelTestBase::setUp
File
-
core/
modules/ workspaces/ tests/ src/ Kernel/ WorkspaceFormPersistenceTest.php, line 50
Class
- WorkspaceFormPersistenceTest
- Tests form persistence for the active workspace.
Namespace
Drupal\Tests\workspaces\KernelCode
protected function setUp() : void {
parent::setUp();
$this->entityTypeManager = \Drupal::entityTypeManager();
$this->formBuilder = \Drupal::formBuilder();
$this->installEntitySchema('user');
$this->installEntitySchema('workspace');
Workspace::create([
'id' => 'ham',
'label' => 'Ham',
])->save();
Workspace::create([
'id' => 'cheese',
'label' => 'Cheese',
])->save();
$this->setCurrentUser($this->createUser([
'view any workspace',
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.