You are here

protected function LocalTaskManagerTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php, line 104
Contains \Drupal\Tests\Core\Menu\LocalTaskManagerTest.

Class

LocalTaskManagerTest
@coversDefaultClass \Drupal\Core\Menu\LocalTaskManager @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

protected function setUp() {
  parent::setUp();
  $this->controllerResolver = $this
    ->getMock('Drupal\\Core\\Controller\\ControllerResolverInterface');
  $this->request = new Request();
  $this->routeProvider = $this
    ->getMock('Drupal\\Core\\Routing\\RouteProviderInterface');
  $this->pluginDiscovery = $this
    ->getMock('Drupal\\Component\\Plugin\\Discovery\\DiscoveryInterface');
  $this->factory = $this
    ->getMock('Drupal\\Component\\Plugin\\Factory\\FactoryInterface');
  $this->cacheBackend = $this
    ->getMock('Drupal\\Core\\Cache\\CacheBackendInterface');
  $this->accessManager = $this
    ->getMock('Drupal\\Core\\Access\\AccessManagerInterface');
  $this->routeMatch = $this
    ->getMock('Drupal\\Core\\Routing\\RouteMatchInterface');
  $this->account = $this
    ->getMock('Drupal\\Core\\Session\\AccountInterface');
  $this
    ->setupLocalTaskManager();
  $this
    ->setupNullCacheabilityMetadataValidation();
}