$this->moduleHandler =
$this->
createMock('\Drupal\Core\Extension\ModuleHandlerInterface'
);
$this->language =
$this->
createMock('\Drupal\Core\Language\LanguageInterface'
);
$this->cacheTagsInvalidator =
$this->
createMock('\Drupal\Core\Cache\CacheTagsInvalidatorInterface'
);
$this->renderer =
$this->
createMock('Drupal\Core\Render\RendererInterface'
);
$this->token =
new Token($this->moduleHandler,
$this->cache,
$this->languageManager,
$this->cacheTagsInvalidator,
$this->renderer
);
$container =
new ContainerBuilder();
$this->cacheContextManager =
new CacheContextsManager($container,
[ 'current_user',
'custom_context',
]);
$container->
set('cache_contexts_manager',
$this->cacheContextManager
);
\Drupal::
setContainer($container);
} /**
* @covers ::getInfo
*/
public function testGetInfo() {