diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index b2a7bf1..1da29c4 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1435,7 +1435,7 @@ class DrupalWebTestCase extends DrupalTestCase {
    */
   protected function refreshVariables() {
     global $conf;
-    cache_clear_all('variables', 'cache_bootstrap');
+    cache('bootstrap')->deletePrefix('variables');
     $conf = variable_initialize();
   }
 
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module
index ede9ac6..25cb152 100644
--- a/modules/simpletest/simpletest.module
+++ b/modules/simpletest/simpletest.module
@@ -311,7 +311,7 @@ function simpletest_test_get_all() {
   if (!$groups) {
     // Load test information from cache if available, otherwise retrieve the
     // information from each tests getInfo() method.
-    if ($cache = cache_get('simpletest', 'cache')) {
+    if ($cache = cache->()get('simpletest')) {
       $groups = $cache->data;
     }
     else {
@@ -347,7 +347,7 @@ function simpletest_test_get_all() {
 
       // Allow modules extending core tests to disable originals.
       drupal_alter('simpletest', $groups);
-      cache_set('simpletest', $groups);
+      cache()->set('simpletest', $groups);
     }
   }
   return $groups;
@@ -421,7 +421,7 @@ function simpletest_clean_environment() {
 
   // Detect test classes that have been added, renamed or deleted.
   registry_rebuild();
-  cache_clear_all('simpletest', 'cache');
+  cache()->deletePrefix('simpletest');
 }
 
 /**
