protected function RelationshipNormalizerValueTest::setUp in JSON:API 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Normalizer/ Value/ RelationshipNormalizerValueTest.php, line 34
Class
- RelationshipNormalizerValueTest
- @coversDefaultClass \Drupal\jsonapi\Normalizer\Value\RelationshipNormalizerValue @group jsonapi
Namespace
Drupal\Tests\jsonapi\Unit\Normalizer\ValueCode
protected function setUp() {
parent::setUp();
$this->cacheContextsManager = $this
->getMockBuilder('Drupal\\Core\\Cache\\Context\\CacheContextsManager')
->disableOriginalConstructor()
->getMock();
$this->cacheContextsManager
->method('assertValidTokens')
->willReturn(TRUE);
$container = new ContainerBuilder();
$container
->set('cache_contexts_manager', $this->cacheContextsManager);
\Drupal::setContainer($container);
}