function AddModerationConfigActionTest::testActionOnlyTargetsWorkflows

Same name in other branches
  1. 10 core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php \Drupal\Tests\content_moderation\Kernel\ConfigAction\AddModerationConfigActionTest::testActionOnlyTargetsWorkflows()

File

core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php, line 76

Class

AddModerationConfigActionTest
@covers \Drupal\content_moderation\Plugin\ConfigAction\AddModeration @covers \Drupal\content_moderation\Plugin\ConfigAction\AddModerationDeriver @group content_moderation @group Recipe

Namespace

Drupal\Tests\content_moderation\Kernel\ConfigAction

Code

public function testActionOnlyTargetsWorkflows() : void {
    $recipe = $this->createRecipe('user.role.anonymous');
    $this->expectException(PluginNotFoundException::class);
    $this->expectExceptionMessage('The "user_role" entity does not support the "addNodeTypes" config action.');
    RecipeRunner::processRecipe($recipe);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.