diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module index c1fb1e0..eb4cfa8 100644 --- a/core/modules/file/tests/file_test/file_test.module +++ b/core/modules/file/tests/file_test/file_test.module @@ -315,7 +315,7 @@ function file_test_file_predelete(File $file) { function file_test_file_url_alter(&$uri) { // Only run this hook when this variable is set. Otherwise, we'd have to add // another hidden test module just for this hook. - $alter_mode = variable_get('file_test_hook_file_url_alter', FALSE); + $alter_mode = state()->get('file_test_hook_file_url_alter', FALSE); if (!$alter_mode) { return; } diff --git a/core/modules/language/tests/language_test.module b/core/modules/language/tests/language_test.module index 5d4829f..bf87655 100644 --- a/core/modules/language/tests/language_test.module +++ b/core/modules/language/tests/language_test.module @@ -31,7 +31,7 @@ function language_test_init() { * Implements hook_language_types_info(). */ function language_test_language_types_info() { - if (variable_get('language_test_language_types', FALSE)) { + if (state()->get('language_test_language_types', FALSE)) { return array( 'test_language_type' => array( 'name' => t('Test'), diff --git a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDFunctionalTest.php b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDFunctionalTest.php index 87a5d32..08400eb 100644 --- a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDFunctionalTest.php +++ b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDFunctionalTest.php @@ -146,8 +146,8 @@ class OpenIDFunctionalTest extends OpenIDTestBase { $this->drupalLogout(); // Test logging in via the login block on the front page. - state()->del('openid_test_hook_openid_response_response'); - state()->del('openid_test_hook_openid_response_account'); + state()->delete('openid_test_hook_openid_response_response'); + state()->delete('openid_test_hook_openid_response_account'); $this->submitLoginForm($identity); $this->assertLink(t('Log out'), 0, t('User was logged in.')); $response = state()->get('openid_test_hook_openid_response_response'); @@ -334,8 +334,8 @@ class OpenIDFunctionalTest extends OpenIDTestBase { $this->addIdentity(url('openid-test/redirect/' . $redirects, array('absolute' => TRUE)), $version, $local_id, $claimed_id); // Clean up. - state()->del('openid_test_redirect_url'); - state()->del('openid_test_response'); + state()->delete('openid_test_redirect_url'); + state()->delete('openid_test_response'); } /** diff --git a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php index 3dcaa57..3249699 100644 --- a/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php +++ b/core/modules/openid/lib/Drupal/openid/Tests/OpenIDRegistrationTest.php @@ -162,7 +162,7 @@ class OpenIDRegistrationTest extends OpenIDTestBase { $this->assertFalse(state()->get('openid_test_hook_openid_response_account') ?: TRUE, t('No user object passed to hook_openid_response().')); // Enter username and e-mail address manually. - state()->del('openid_test_hook_openid_response_response'); + state()->delete('openid_test_hook_openid_response_response'); $edit = array('name' => 'john', 'mail' => 'john@example.com'); $this->drupalPost(NULL, $edit, t('Create new account')); $this->assertRaw(t('Once you have verified your e-mail address, you may log in via OpenID.'), t('User was asked to verify e-mail address.')); diff --git a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/VariableTest.php b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/VariableTest.php index 94cf36d..99a86fe 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/VariableTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/VariableTest.php @@ -44,7 +44,7 @@ class VariableTest extends WebTestBase { // Deleting variables. $default_value = $this->randomName(); - state()->del('simpletest_bootstrap_variable_test'); + state()->delete('simpletest_bootstrap_variable_test'); $variable = state()->get('simpletest_bootstrap_variable_test') ?: $default_value; $this->assertIdentical($variable, $default_value, t('Deleting variables')); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php b/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php index 9ddd75e..892ec7c 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.php @@ -88,7 +88,7 @@ class TrailTest extends MenuTestBase { ); // Test the tree generation for the Navigation menu. - state()->del('menu_test_menu_tree_set_path'); + state()->delete('menu_test_menu_tree_set_path'); $this->assertBreadcrumb('menu-test/menu-trail', $breadcrumb, t('Menu trail - Case 1'), $tree); // Override the active trail for the Management tree; it should not affect @@ -114,7 +114,7 @@ class TrailTest extends MenuTestBase { ); // Test the tree generation for the Management menu. - state()->del('menu_test_menu_tree_set_path'); + state()->delete('menu_test_menu_tree_set_path'); $this->assertBreadcrumb('admin/config/development/menu-trail', $breadcrumb, t('Menu trail - Case 2'), $tree); // Override the active trail for the Management tree; it should affect the diff --git a/core/modules/system/lib/Drupal/system/Tests/System/CronRunTest.php b/core/modules/system/lib/Drupal/system/Tests/System/CronRunTest.php index 09d53d5..795216e 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/CronRunTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/CronRunTest.php @@ -90,7 +90,7 @@ class CronRunTest extends WebTestBase { * Make sure exceptions thrown on hook_cron() don't affect other modules. */ function testCronExceptions() { - state()->del('common_test_cron'); + state()->delete('common_test_cron'); // The common_test module throws an exception. If it isn't caught, the tests // won't finish successfully. // The common_test_cron_helper module sets the 'common_test_cron' variable.