function AddModerationConfigActionTest::testDeriverAdminLabel

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

File

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

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 testDeriverAdminLabel() : void {
    $this->enableModules([
        'workflows',
        'content_moderation',
    ]);
    
    /** @var array<string, array{admin_label: \Stringable}> $definitions */
    $definitions = $this->container
        ->get('plugin.manager.config_action')
        ->getDefinitions();
    $this->assertSame('Add moderation to all content types', (string) $definitions['add_moderation:addNodeTypes']['admin_label']);
    $this->assertSame('Add moderation to all vocabularies', (string) $definitions['add_moderation:addTaxonomyVocabularies']['admin_label']);
}

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