public function WorkspaceInternalResourceTest::testCreateWorkspaceAssociationResource in Workspace 8.2
Tests enabling workspace associations for REST throws an exception.
See also
\Drupal\workspace\Entity\WorkspaceAssociation
File
- tests/
src/ Kernel/ WorkspaceInternalResourceTest.php, line 27
Class
- WorkspaceInternalResourceTest
- Tests REST module with internal workspace entity types.
Namespace
Drupal\Tests\workspace\KernelCode
public function testCreateWorkspaceAssociationResource() {
$this
->setExpectedException(PluginNotFoundException::class, 'The "entity:workspace_association" plugin does not exist.');
RestResourceConfig::create([
'id' => 'entity.workspace_association',
'granularity' => RestResourceConfigInterface::RESOURCE_GRANULARITY,
'configuration' => [
'methods' => [
'GET',
],
'formats' => [
'json',
],
'authentication' => [
'cookie',
],
],
])
->enable()
->save();
}