function OffsetPageTest::setUp

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php \Drupal\Tests\jsonapi\Unit\Query\OffsetPageTest::setUp()
  2. 10 core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php \Drupal\Tests\jsonapi\Unit\Query\OffsetPageTest::setUp()
  3. 11.x core/modules/jsonapi/tests/src/Unit/Query/OffsetPageTest.php \Drupal\Tests\jsonapi\Unit\Query\OffsetPageTest::setUp()

Overrides UnitTestCase::setUp

File

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

Class

OffsetPageTest
@coversDefaultClass \Drupal\jsonapi\Query\OffsetPage @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

protected function setUp() {
    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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.