From 957b5564429d77980df8f84ac46b38ca89604cc4 Mon Sep 17 00:00:00 2001 From: Dries Date: Sat, 9 Mar 2013 10:16:21 -0500 Subject: [PATCH] Issue #1932596 by ACF: Change site_name() into config in userpasswordreset.test and formtest. --- core/modules/field/lib/Drupal/field/Tests/FormTest.php | 2 +- .../user/lib/Drupal/user/Tests/UserPasswordResetTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/field/lib/Drupal/field/Tests/FormTest.php b/core/modules/field/lib/Drupal/field/Tests/FormTest.php index 2f5dbeedba1..fcda22372ac 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FormTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FormTest.php @@ -65,7 +65,7 @@ class FormTest extends FieldTestBase { $this->drupalGet('test-entity/add/test_bundle'); // Create token value expected for description. - $token_description = check_plain(variable_get('site_name', 'Drupal')) . '_description'; + $token_description = check_plain(config('system.site')->get('name')) . '_description'; $this->assertText($token_description, 'Token replacement for description is displayed'); $this->assertFieldByName("{$this->field_name}[$langcode][0][value]", '', 'Widget is displayed'); $this->assertNoField("{$this->field_name}[$langcode][1][value]", 'No extraneous widget is displayed'); diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php index f103abfb131..bd75e060829 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPasswordResetTest.php @@ -60,7 +60,7 @@ class UserPasswordResetTest extends WebTestBase { // Verify that the user was sent an e-mail. $this->assertMail('to', $this->account->mail, t('Password e-mail sent to user.')); - $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->name, '@site' => variable_get('site_name', 'Drupal'))); + $subject = t('Replacement login information for @username at @site', array('@username' => $this->account->name, '@site' => config('system.site')->get('name'))); $this->assertMail('subject', $subject, 'Password reset e-mail subject is correct.'); $resetURL = $this->getResetURL(); @@ -73,7 +73,7 @@ class UserPasswordResetTest extends WebTestBase { // Check successful login. $this->drupalPost(NULL, NULL, t('Log in')); $this->assertLink(t('Log out')); - $this->assertTitle(t('@name | @site', array('@name' => $this->account->name, '@site' => variable_get('site_name', 'Drupal'))), 'Logged in using password reset link.'); + $this->assertTitle(t('@name | @site', array('@name' => $this->account->name, '@site' => config('system.site')->get('name'))), 'Logged in using password reset link.'); // Log out, and try to log in again using the same one-time link. $this->drupalLogout();