public function UserLocalTaskTest::testGetDerivativeDefinitions in Drupal 10
Tests the derivatives generated for local tasks.
@covers \Drupal\user\Plugin\Derivative\UserLocalTask::getDerivativeDefinitions()
File
- core/
modules/ user/ tests/ src/ Unit/ Plugin/ Derivative/ UserLocalTaskTest.php, line 64
Class
- UserLocalTaskTest
- Tests the local tasks deriver class.
Namespace
Drupal\Tests\user\Unit\Plugin\DerivativeCode
public function testGetDerivativeDefinitions() {
$expected = [
'permissions_entity_bundle_of_id' => [
'route_name' => 'entity.entity_bundle_of_id.entity_permissions_form',
'weight' => 10,
'title' => $this
->getStringTranslationStub()
->translate('Manage permissions'),
'base_route' => 'field_ui.base_route',
],
];
$this
->assertEquals($expected, $this->deriver
->getDerivativeDefinitions([]));
}