function CacheCollectorTest::testUpdateCacheNoChanges

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::testUpdateCacheNoChanges()
  2. 10 core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::testUpdateCacheNoChanges()
  3. 11.x core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php \Drupal\Tests\Core\Cache\CacheCollectorTest::testUpdateCacheNoChanges()

Tests updating the cache when no changes were made.

File

core/tests/Drupal/Tests/Core/Cache/CacheCollectorTest.php, line 152

Class

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

Namespace

Drupal\Tests\Core\Cache

Code

public function testUpdateCacheNoChanges() {
    $this->lock
        ->expects($this->never())
        ->method('acquire');
    $this->cacheBackend
        ->expects($this->never())
        ->method('set');
    // Destruct the object to trigger the update data process.
    $this->collector
        ->destruct();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.