function SaveActionTest::testGetDerivativeDefinitions

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php \Drupal\KernelTests\Core\Action\SaveActionTest::testGetDerivativeDefinitions()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php \Drupal\KernelTests\Core\Action\SaveActionTest::testGetDerivativeDefinitions()
  3. 11.x core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php \Drupal\KernelTests\Core\Action\SaveActionTest::testGetDerivativeDefinitions()

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

File

core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php, line 33

Class

SaveActionTest
@group Action

Namespace

Drupal\KernelTests\Core\Action

Code

public function testGetDerivativeDefinitions() : void {
    $deriver = new EntityChangedActionDeriver(\Drupal::entityTypeManager(), \Drupal::translation());
    $definitions = $deriver->getDerivativeDefinitions([
        'action_label' => 'Save',
    ]);
    $this->assertEquals([
        'type' => 'entity_test_mul_changed',
        'label' => 'Save test entity - multiple changed and data table',
        'action_label' => 'Save',
    ], $definitions['entity_test_mul_changed']);
}

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