protected function ForumBreadcrumbBuilderBaseTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/forum/tests/src/Unit/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumBreadcrumbBuilderBaseTest::setUp()
- 10 core/modules/forum/tests/src/Unit/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumBreadcrumbBuilderBaseTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ forum/ tests/ src/ Unit/ Breadcrumb/ ForumBreadcrumbBuilderBaseTest.php, line 20
Class
- ForumBreadcrumbBuilderBaseTest
- @coversDefaultClass \Drupal\forum\Breadcrumb\ForumBreadcrumbBuilderBase @group forum
Namespace
Drupal\Tests\forum\Unit\BreadcrumbCode
protected function setUp() : void {
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);
}