You are here

public function PublishActionTest::testGetDerivativeDefinitions in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php \Drupal\KernelTests\Core\Action\PublishActionTest::testGetDerivativeDefinitions()

@covers \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver::getDerivativeDefinitions

File

core/tests/Drupal/KernelTests/Core/Action/PublishActionTest.php, line 31

Class

PublishActionTest
@group Action

Namespace

Drupal\KernelTests\Core\Action

Code

public function testGetDerivativeDefinitions() {
  $deriver = new EntityPublishedActionDeriver(\Drupal::entityTypeManager(), \Drupal::translation());
  $this
    ->assertArraySubset([
    'entity_test_mulrevpub' => [
      'type' => 'entity_test_mulrevpub',
      'label' => 'Save test entity - revisions, data table, and published interface',
      'action_label' => 'Save',
    ],
  ], $deriver
    ->getDerivativeDefinitions([
    'action_label' => 'Save',
  ]));
}