function WorkspaceTestUtilities::ignoreEntityType
Same name in other branches
- 11.x core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php \Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities::ignoreEntityType()
Marks an entity type as ignored in a workspace.
Parameters
string $entity_type_id: The entity type ID.
1 call to WorkspaceTestUtilities::ignoreEntityType()
- WorkspaceViewsBulkFormTest::testBulkForm in core/
modules/ workspaces/ tests/ src/ Functional/ WorkspaceViewsBulkFormTest.php - Tests the bulk form.
File
-
core/
modules/ workspaces/ tests/ src/ Functional/ WorkspaceTestUtilities.php, line 212
Class
- WorkspaceTestUtilities
- Utility methods for use in BrowserTestBase tests.
Namespace
Drupal\Tests\workspaces\FunctionalCode
protected function ignoreEntityType(string $entity_type_id) : void {
$entity_type = clone \Drupal::entityTypeManager()->getDefinition($entity_type_id);
$entity_type->setHandlerClass('workspace', IgnoredWorkspaceHandler::class);
\Drupal::state()->set("{$entity_type_id}.entity_type", $entity_type);
\Drupal::entityTypeManager()->clearCachedDefinitions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.