You are here

protected function EntityConditionTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::setUp()
  2. 9 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php, line 23

Class

EntityConditionTest
@coversDefaultClass \Drupal\jsonapi\Query\EntityCondition @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

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