protected function CacheCollectorTest::setUp in Drupal 8
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheCollectorTest.php, line 52
Class
- CacheCollectorTest
- @coversDefaultClass \Drupal\Core\Cache\CacheCollector @group Cache
Namespace
Drupal\Tests\Core\CacheCode
protected function setUp() {
$this->cacheBackend = $this
->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
$this->cacheTagsInvalidator = $this
->createMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
$this->lock = $this
->createMock('Drupal\\Core\\Lock\\LockBackendInterface');
$this->cid = $this
->randomMachineName();
$this->collector = new CacheCollectorHelper($this->cid, $this->cacheBackend, $this->lock);
$this
->getContainerWithCacheTagsInvalidator($this->cacheTagsInvalidator);
}