function UserLocalTaskTest::testGetDerivativeDefinitions
Same name in other branches
- 9 core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php \Drupal\Tests\user\Unit\Plugin\Derivative\UserLocalTaskTest::testGetDerivativeDefinitions()
- 10 core/modules/user/tests/src/Unit/Plugin/Derivative/UserLocalTaskTest.php \Drupal\Tests\user\Unit\Plugin\Derivative\UserLocalTaskTest::testGetDerivativeDefinitions()
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 69
Class
- UserLocalTaskTest
- Tests the local tasks deriver class.
Namespace
Drupal\Tests\user\Unit\Plugin\DerivativeCode
public function testGetDerivativeDefinitions() : void {
$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([]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.