diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php index 41d114e..999dcf0 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestTest.php @@ -252,7 +252,7 @@ function confirmStubTestResults() { $this->assertAssertion(t('Invalid permission %permission.', array('%permission' => $this->invalidPermission)), 'Role', 'Fail', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()'); // Check that the user was logged in successfully. - $this->assertAssertion('User SimpleTestTest successfully logged in.', 'User login', 'Pass', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()'); + $this->assertAssertion("User SimpleTestTest's successfully logged in.", 'User login', 'Pass', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()'); // Check that a warning is caught by simpletest. The exact error message // differs between PHP versions so only the function name is checked. diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index 425c4a1..b96d80f 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -202,7 +202,7 @@ function testTrackerUser() { $this->assertNoLink($unpublished->label()); // Verify that title and tab title have been set correctly. $this->assertText('Activity', 'The user activity tab has the name "Activity".'); - $this->assertTitle(t('@name | @site', array('@name' => $this->user->getUsername(), '@site' => $this->config('system.site')->get('name'))), 'The user tracker page has the correct page title.'); + $this->assertTitle(t($this->user->getUsername().' | '. $this->config('system.site')->get('name')), 'The user tracker page has the correct page title. - '.$this->user->getUsername().' | '. $this->config('system.site')->get('name')); // Verify that unpublished comments are removed from the tracker. $admin_user = $this->drupalCreateUser(array('post comments', 'administer comments', 'access user profiles')); diff --git a/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php b/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php index d752157..e837f85 100644 --- a/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php +++ b/core/modules/user/src/Tests/Views/HandlerFieldUserNameTest.php @@ -52,7 +52,7 @@ public function testUserName() { $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $new_user) { return $view->field['name']->advancedRender($view->result[$new_user->id()]); }); - $this->assertTrue(strpos($render, $new_user->getDisplayName()) !== FALSE, 'If link to user is checked the username should be part of the output.'); + $this->assertTrue(strpos(html_entity_decode($render, ENT_QUOTES, 'UTF-8'), $new_user->getDisplayName()) !== FALSE, 'If link to user is checked the username should be part of the output.'); $this->assertTrue(strpos($render, 'user/' . $new_user->id()) !== FALSE, 'If link to user is checked the link to the user should appear as well.'); $view->field['name']->options['link_to_user'] = FALSE; @@ -60,7 +60,7 @@ public function testUserName() { $render = $renderer->executeInRenderContext(new RenderContext(), function () use ($view, $new_user) { return $view->field['name']->advancedRender($view->result[$new_user->id()]); }); - $this->assertEqual($render, $new_user->getDisplayName(), 'If the user is not linked the username should be printed out for a normal user.'); + $this->assertEqual(html_entity_decode($render, ENT_QUOTES, 'UTF-8'), $new_user->getDisplayName(), 'If the user is not linked the username should be printed out for a normal user.'); }