function WorkspaceEntityRepositoryTest::setUp
Overrides KernelTestBase::setUp
File
-
core/
modules/ workspaces/ tests/ src/ Kernel/ WorkspaceEntityRepositoryTest.php, line 48
Class
- WorkspaceEntityRepositoryTest
- Tests the entity repository integration for workspaces.
Namespace
Drupal\Tests\workspaces\KernelCode
protected function setUp() : void {
parent::setUp();
$this->entityTypeManager = $this->container
->get('entity_type.manager');
$this->entityRepository = $this->container
->get('entity.repository');
$this->installEntitySchema('entity_test_revpub');
$this->installEntitySchema('entity_test_mulrevpub');
$this->installEntitySchema('workspace');
$this->installSchema('workspaces', [
'workspace_association',
]);
$this->installConfig([
'system',
'language',
]);
ConfigurableLanguage::createFromLangcode('ro')->setWeight(1)
->save();
Workspace::create([
'id' => 'ham',
'label' => 'Ham',
])->save();
Workspace::create([
'id' => 'cheese',
'label' => 'Cheese',
])->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.