Skip to content
Snippets Groups Projects
Commit e54f7b7f authored by shalini_jha's avatar shalini_jha
Browse files

Added clearCaches method.

parent 8cbabe59
No related branches found
No related tags found
1 merge request!9595Start taxonomy term admin list page performance test
......@@ -5,6 +5,7 @@
namespace Drupal\Tests\demo_umami\FunctionalJavascript;
use Drupal\block\Entity\Block;
use Drupal\Core\Cache\Cache;
use Drupal\FunctionalJavascriptTests\PerformanceTestBase;
/**
......@@ -117,4 +118,13 @@ protected function assertTermInVocabularyAdminPage(string $term_name = 'Baked'):
$this->assertSession()->elementTextContains('xpath', '//table[@id="taxonomy"]', $term_name);
}
/**
* Clears all cache bins.
*/
protected function clearCaches(): void {
foreach (Cache::getBins() as $bin) {
$bin->deleteAll();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment