function LocalTaskManagerTest::setUp

Same name and namespace in other branches
  1. 8.9.x 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 99

Class

LocalTaskManagerTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Menu%21LocalTaskManager.php/class/LocalTaskManager/9" title="Provides the default local task manager using YML as primary definition." class="local">\Drupal\Core\Menu\LocalTaskManager</a> @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

protected function setUp() : void {
    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.