function UserLocalTasksTest::setUp
Same name in other branches
- 8.9.x core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::setUp()
- 10 core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::setUp()
- 11.x core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php \Drupal\Tests\user\Unit\Menu\UserLocalTasksTest::setUp()
Overrides LocalTaskIntegrationTestBase::setUp
File
-
core/
modules/ user/ tests/ src/ Unit/ Menu/ UserLocalTasksTest.php, line 18
Class
- UserLocalTasksTest
- Tests user local tasks.
Namespace
Drupal\Tests\user\Unit\MenuCode
protected function setUp() : void {
$this->directoryList = [
'user' => 'core/modules/user',
];
parent::setUp();
// Add services required for user local tasks.
$entity_type_manager = $this->createMock(EntityTypeManagerInterface::class);
$entity_type_manager->expects($this->any())
->method('getDefinitions')
->willReturn([]);
$this->container
->set('entity_type.manager', $entity_type_manager);
$this->container
->set('string_translation', $this->getStringTranslationStub());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.