function LocalTaskManagerTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::setUp()
  3. 11.x 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 100

Class

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

Namespace

Drupal\Tests\Core\Menu

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.