public function CacheDataCollectorTest::testCacheCollectorMiss in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php \Drupal\Tests\webprofiler\Unit\DataCollector\CacheDataCollectorTest::testCacheCollectorMiss()
- 8.2 webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php \Drupal\Tests\webprofiler\Unit\DataCollector\CacheDataCollectorTest::testCacheCollectorMiss()
- 4.x webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php \Drupal\Tests\webprofiler\Unit\DataCollector\CacheDataCollectorTest::testCacheCollectorMiss()
Tests the collection of a cache miss.
File
- webprofiler/
tests/ src/ Unit/ DataCollector/ CacheDataCollectorTest.php, line 36
Class
- CacheDataCollectorTest
- @coversDefaultClass \Drupal\webprofiler\DataCollector\CacheDataCollector
Namespace
Drupal\Tests\webprofiler\Unit\DataCollectorCode
public function testCacheCollectorMiss() {
$this->cacheBackendInterface
->expects($this
->once())
->method('get')
->will($this
->returnValue(FALSE));
$cacheBackendWrapper = new CacheBackendWrapper($this->cacheDataCollector, $this->cacheBackendInterface, 'default');
$cache = $cacheBackendWrapper
->get('cache_id');
$this
->assertFalse($cache);
$this
->assertEquals(1, $this->cacheDataCollector
->getCacheMissesCount());
}