diff -u b/core/modules/user/src/Tests/UserBlocksTest.php b/core/modules/user/src/Tests/UserBlocksTest.php --- b/core/modules/user/src/Tests/UserBlocksTest.php +++ b/core/modules/user/src/Tests/UserBlocksTest.php @@ -72,7 +72,7 @@ $edit['name'] = $this->randomMachineName(); $edit['pass'] = $this->randomMachineName(); $this->drupalPostForm('node', $edit, t('Log in')); - $this->assertText(t('Unrecognized username or password.')); + $this->assertNoRaw('Username', t('Unrecognized username or password.')); // Create a user with some permission that anonymous users lack. $user = $this->drupalCreateUser(array('administer permissions'));