You are here

protected function EntityBundleAccessCheckTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Entity/EntityBundleAccessCheckTest.php \Drupal\Tests\Core\Entity\EntityBundleAccessCheckTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Entity/EntityBundleAccessCheckTest.php, line 30

Class

EntityBundleAccessCheckTest
Unit test of entity access checking system.

Namespace

Drupal\Tests\Core\Entity

Code

protected function setUp() : void {
  $cache_contexts_manager = $this
    ->prophesize(CacheContextsManager::class)
    ->reveal();
  $container = new Container();
  $container
    ->set('cache_contexts_manager', $cache_contexts_manager);
  \Drupal::setContainer($container);
}