diff --git a/core/modules/file/src/Tests/FileFieldPathTest.php b/core/modules/file/src/Tests/FileFieldPathTest.php index 346fc7a..a61f927 100644 --- a/core/modules/file/src/Tests/FileFieldPathTest.php +++ b/core/modules/file/src/Tests/FileFieldPathTest.php @@ -61,7 +61,7 @@ function testUploadPath() { // the user running the test case. $data = array('user' => $this->adminUser); $subdirectory = \Drupal::token()->replace('[user:uid]/[user:name]', $data); - $this->assertPathMatch('public://' . $subdirectory . '/' . $test_file->getFilename(), $node_file->getFileUri(), format_string('The file %file was uploaded to the correct path with token replacements.', array('%file' => $node_file->getFileUri()))); + $this->assertPathMatch('public://' . html_entity_decode($subdirectory, ENT_QUOTES, "UTF-8") . '/' . $test_file->getFilename(), $node_file->getFileUri(), format_string('The file %file was uploaded to the correct path with token replacements.', array('%file' => $node_file->getFileUri()))); } /** diff --git a/core/modules/simpletest/src/Tests/SimpleTestTest.php b/core/modules/simpletest/src/Tests/SimpleTestTest.php index 999dcf0..53738ed 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's successfully logged in.", 'User login', 'Pass', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()'); + $this->assertAssertion("User SimpleTestTest 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/system/src/Tests/System/PageNotFoundTest.php b/core/modules/system/src/Tests/System/PageNotFoundTest.php index 623fd31..b7c0609 100644 --- a/core/modules/system/src/Tests/System/PageNotFoundTest.php +++ b/core/modules/system/src/Tests/System/PageNotFoundTest.php @@ -48,6 +48,6 @@ function testPageNotFound() { $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration')); $this->drupalGet($this->randomMachineName(10)); - $this->assertEscaped($this->adminUser->getUsername(), 'Found the custom 404 page'); + $this->assertText($this->adminUser->getUsername(), 'Found the custom 404 page'); } } diff --git a/core/modules/user/src/Tests/UserTokenReplaceTest.php b/core/modules/user/src/Tests/UserTokenReplaceTest.php index 5a472f4..a4b1007 100644 --- a/core/modules/user/src/Tests/UserTokenReplaceTest.php +++ b/core/modules/user/src/Tests/UserTokenReplaceTest.php @@ -107,7 +107,7 @@ function testUserTokenReplacement() { foreach ($tests as $input => $expected) { $bubbleable_metadata = new BubbleableMetadata(); $output = $token_service->replace($input, ['user' => $account], ['langcode' => $language_interface->getId()], $bubbleable_metadata); - $this->assertEqual($output, $expected, new FormattableMarkup('User token %token replaced.', ['%token' => $input])); + $this->assertEqual(html_entity_decode($output, ENT_QUOTES, "UTF-8"), stripslashes($expected), new FormattableMarkup('User token %token replaced.', ['%token' => $input])); $this->assertEqual($bubbleable_metadata, $metadata_tests[$input]); }