/**
* @covers ::getBundlesForEntityType
* @covers ::addEntityTypeAndBundle
* @covers ::removeEntityTypeAndBundle
*/
public function testGetBundlesForEntityType() { /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration $workflow_plugin */
$workflow_plugin =
$this->workflow->
getTypePlugin();
// The content moderation plugin does not validate the existence of the
// entity type or bundle.
$this->
assertEquals([],
$workflow_plugin->
getBundlesForEntityType('fake_node'
));
$workflow_plugin->
addEntityTypeAndBundle('fake_node', 'fake_page'
);
$this->
assertEquals(['fake_page'
],
$workflow_plugin->
getBundlesForEntityType('fake_node'
));
$this->
assertEquals([],
$workflow_plugin->
getBundlesForEntityType('fake_block'
));
$workflow_plugin->
removeEntityTypeAndBundle('fake_node', 'fake_page'
);
$this->
assertEquals([],
$workflow_plugin->
getBundlesForEntityType('fake_node'
));
} /**
* @covers ::appliesToEntityTypeAndBundle
* @covers ::addEntityTypeAndBundle
* @covers ::removeEntityTypeAndBundle
*/