public function UpdateSemverCoreTest::testClearDiskCache in Drupal 10
Same name and namespace in other branches
- 9 core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php \Drupal\Tests\update\Functional\UpdateSemverCoreTest::testClearDiskCache()
 
Checks that clearing the disk cache works.
File
- core/
modules/ update/ tests/ src/ Functional/ UpdateSemverCoreTest.php, line 319  
Class
- UpdateSemverCoreTest
 - Tests the Update Manager module through a series of functional tests using mock XML data.
 
Namespace
Drupal\Tests\update\FunctionalCode
public function testClearDiskCache() {
  $directories = [
    _update_manager_cache_directory(FALSE),
    _update_manager_extract_directory(FALSE),
  ];
  // Check that update directories does not exists.
  foreach ($directories as $directory) {
    $this
      ->assertDirectoryDoesNotExist($directory);
  }
  // Method must not fail if update directories do not exists.
  update_clear_update_disk_cache();
}