function TokenTest::setUpMockCache
Reinitializes the cache as a mock object.
1 call to TokenTest::setUpMockCache()
- TokenTest::testGetInfo in core/
tests/ Drupal/ Tests/ Core/ Utility/ TokenTest.php - Tests get info.
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ TokenTest.php, line 110
Class
Namespace
Drupal\Tests\Core\UtilityCode
protected function setUpMockCache() : void {
$this->cache = $this->createMock(CacheBackendInterface::class);
$reflection = new \ReflectionProperty($this->token, 'cache');
$reflection->setValue($this->token, $this->cache);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.