You are here

protected function CacheCollectorTest::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::setUp()
  2. 8 core/tests/Drupal/KernelTests/Core/Cache/CacheCollectorTest.php \Drupal\KernelTests\Core\Cache\CacheCollectorTest::setUp()
Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php, line 57
Contains \Drupal\Tests\Core\Cache\CacheCollectorTest.

Class

CacheCollectorTest
@coversDefaultClass \Drupal\Core\Cache\CacheCollector @group Cache

Namespace

Drupal\Tests\Core\Cache

Code

protected function setUp() {
  $this->cacheBackend = $this
    ->getMock('Drupal\\Core\\Cache\\CacheBackendInterface');
  $this->cacheTagsInvalidator = $this
    ->getMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
  $this->lock = $this
    ->getMock('Drupal\\Core\\Lock\\LockBackendInterface');
  $this->cid = $this
    ->randomMachineName();
  $this->collector = new CacheCollectorHelper($this->cid, $this->cacheBackend, $this->lock);
  $this
    ->getContainerWithCacheTagsInvalidator($this->cacheTagsInvalidator);
}