protected function SystemLocalTasksTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php \Drupal\Tests\system\Unit\Menu\SystemLocalTasksTest::setUp()
- 9 core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php \Drupal\Tests\system\Unit\Menu\SystemLocalTasksTest::setUp()
Overrides LocalTaskIntegrationTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Unit/ Menu/ SystemLocalTasksTest.php, line 25
Class
- SystemLocalTasksTest
- Tests existence of system local tasks.
Namespace
Drupal\Tests\system\Unit\MenuCode
protected function setUp() : void {
parent::setUp();
$this->directoryList = [
'system' => 'core/modules/system',
];
$this->themeHandler = $this
->createMock('Drupal\\Core\\Extension\\ThemeHandlerInterface');
$theme = new Extension($this->root, 'theme', 'core/themes/olivero', 'olivero.info.yml');
$theme->status = 1;
$theme->info = [
'name' => 'olivero',
];
$this->themeHandler
->expects($this
->any())
->method('listInfo')
->will($this
->returnValue([
'olivero' => $theme,
]));
$this->themeHandler
->expects($this
->any())
->method('hasUi')
->with('olivero')
->willReturn(TRUE);
$this->container
->set('theme_handler', $this->themeHandler);
}