You are here

protected function SystemLocalTasksTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 30
Contains \Drupal\Tests\system\Unit\Menu\SystemLocalTasksTest.

Class

SystemLocalTasksTest
Tests existence of system local tasks.

Namespace

Drupal\Tests\system\Unit\Menu

Code

protected function setUp() {
  parent::setUp();
  $this->directoryList = array(
    'system' => 'core/modules/system',
  );
  $this->themeHandler = $this
    ->getMock('Drupal\\Core\\Extension\\ThemeHandlerInterface');
  $theme = new Extension($this->root, 'theme', '/core/themes/bartik', 'bartik.info.yml');
  $theme->status = 1;
  $theme->info = array(
    'name' => 'bartik',
  );
  $this->themeHandler
    ->expects($this
    ->any())
    ->method('listInfo')
    ->will($this
    ->returnValue(array(
    'bartik' => $theme,
  )));
  $this->themeHandler
    ->expects($this
    ->any())
    ->method('hasUi')
    ->with('bartik')
    ->willReturn(TRUE);
  $this->container
    ->set('theme_handler', $this->themeHandler);
}