function ForumListingBreadcrumbBuilderTest::setUp
Same name in other branches
- 9 core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::setUp()
- 10 core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::setUp()
- 11.x core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ forum/ tests/ src/ Unit/ Breadcrumb/ ForumListingBreadcrumbBuilderTest.php, line 21
Class
- ForumListingBreadcrumbBuilderTest
- @coversDefaultClass \Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder @group forum
Namespace
Drupal\Tests\forum\Unit\BreadcrumbCode
protected function setUp() {
parent::setUp();
$cache_contexts_manager = $this->getMockBuilder('Drupal\\Core\\Cache\\Context\\CacheContextsManager')
->disableOriginalConstructor()
->getMock();
$cache_contexts_manager->method('assertValidTokens')
->willReturn(TRUE);
$container = new Container();
$container->set('cache_contexts_manager', $cache_contexts_manager);
\Drupal::setContainer($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.