X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fuser%2Ftests%2Fsrc%2FFunctional%2FUserEditTest.php;h=5cdbc19f0506bb1d755a77d514e2ecb5a87fa03a;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=0f75ff8dc58046c6d3fd8a3f1d612c40d81be5cd;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/user/tests/src/Functional/UserEditTest.php b/web/core/modules/user/tests/src/Functional/UserEditTest.php index 0f75ff8dc..5cdbc19f0 100644 --- a/web/core/modules/user/tests/src/Functional/UserEditTest.php +++ b/web/core/modules/user/tests/src/Functional/UserEditTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\user\Functional; +use Drupal\Core\Cache\Cache; use Drupal\Tests\BrowserTestBase; /** @@ -29,9 +30,15 @@ class UserEditTest extends BrowserTestBase { // is the raw value and not a formatted one. \Drupal::state()->set('user_hooks_test_user_format_name_alter', TRUE); \Drupal::service('module_installer')->install(['user_hooks_test']); + Cache::invalidateTags(['rendered']); $this->drupalGet('user/' . $user1->id() . '/edit'); $this->assertFieldByName('name', $user1->getAccountName()); + // Ensure the formatted name is displayed when expected. + $this->drupalGet('user/' . $user1->id()); + $this->assertSession()->responseContains($user1->getDisplayName()); + $this->assertSession()->titleEquals(strip_tags($user1->getDisplayName()) . ' | Drupal'); + // Check that filling out a single password field does not validate. $edit = []; $edit['pass[pass1]'] = '';