diff --git a/core/modules/block/src/Tests/BlockRenderOrderTest.php b/core/modules/block/src/Tests/BlockRenderOrderTest.php index 11da1919e8e1..45bcf540b685 100644 --- a/core/modules/block/src/Tests/BlockRenderOrderTest.php +++ b/core/modules/block/src/Tests/BlockRenderOrderTest.php @@ -68,7 +68,7 @@ class BlockRenderOrderTest extends WebTestBase { } $this->drupalGet(''); - $test_content = $this->drupalGetContent(''); + $test_content = $this->getRawContent(''); $controller = $this->container->get('entity.manager')->getStorage('block'); foreach ($controller->loadMultiple() as $return_block) { diff --git a/core/modules/comment/src/Tests/CommentBlockTest.php b/core/modules/comment/src/Tests/CommentBlockTest.php index d93a220aa39b..a7bcc945b13c 100644 --- a/core/modules/comment/src/Tests/CommentBlockTest.php +++ b/core/modules/comment/src/Tests/CommentBlockTest.php @@ -74,10 +74,10 @@ class CommentBlockTest extends CommentTestBase { $this->assertText($comments[$i]->getSubject(), String::format('Comment @number found in block.', array('@number' => 10 - $i))); if ($i > 1) { $previous_position = $position; - $position = strpos($this->drupalGetContent(), $comments[$i]->getSubject()); + $position = strpos($this->getRawContent(), $comments[$i]->getSubject()); $this->assertTrue($position > $previous_position, String::format('Comment @a appears after comment @b', array('@a' => 10 - $i, '@b' => 11 - $i))); } - $position = strpos($this->drupalGetContent(), $comments[$i]->getSubject()); + $position = strpos($this->getRawContent(), $comments[$i]->getSubject()); } // Test that links to comments work when comments are across pages. diff --git a/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php index 97dd9ccb6c8b..b4fabee2e55e 100644 --- a/core/modules/comment/src/Tests/CommentNonNodeTest.php +++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php @@ -186,7 +186,7 @@ class CommentNonNodeTest extends WebTestBase { $regex .= $comment->comment_body->value . '(.*?)'; $regex .= '/s'; - return (boolean) preg_match($regex, $this->drupalGetContent()); + return (boolean) preg_match($regex, $this->getRawContent()); } else { return FALSE; @@ -200,7 +200,7 @@ class CommentNonNodeTest extends WebTestBase { * Contact info is available. */ function commentContactInfoAvailable() { - return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->drupalGetContent()); + return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->getRawContent()); } /** @@ -239,7 +239,7 @@ class CommentNonNodeTest extends WebTestBase { */ function getUnapprovedComment($subject) { $this->drupalGet('admin/content/comment/approval'); - preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->drupalGetContent(), $match); + preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->getRawContent(), $match); return $match[2]; } diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php index 7b1f7e00e776..dbb6d560967d 100644 --- a/core/modules/comment/src/Tests/CommentTestBase.php +++ b/core/modules/comment/src/Tests/CommentTestBase.php @@ -193,7 +193,7 @@ abstract class CommentTestBase extends WebTestBase { $regex .= ($reply ? '\s(.*?)' : ''); $regex .= '!s'; - return (boolean) preg_match($regex, $this->drupalGetContent()); + return (boolean) preg_match($regex, $this->getRawContent()); } else { return FALSE; @@ -326,7 +326,7 @@ abstract class CommentTestBase extends WebTestBase { * Contact info is available. */ function commentContactInfoAvailable() { - return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->drupalGetContent()); + return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->getRawContent()); } /** @@ -365,7 +365,7 @@ abstract class CommentTestBase extends WebTestBase { */ function getUnapprovedComment($subject) { $this->drupalGet('admin/content/comment/approval'); - preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->drupalGetContent(), $match); + preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->getRawContent(), $match); return $match[2]; } diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index f3aa1ff1ab68..5f8e5ba86b86 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -127,7 +127,7 @@ class ConfigExportImportUITest extends WebTestBase { // Export the configuration. $this->drupalPostForm('admin/config/development/configuration/full/export', array(), 'Export'); - $this->tarball = $this->drupalGetContent(); + $this->tarball = $this->getRawContent(); $this->config('system.site') ->set('slogan', $this->originalSlogan) @@ -184,7 +184,7 @@ class ConfigExportImportUITest extends WebTestBase { // Export the configuration. $this->drupalPostForm('admin/config/development/configuration/full/export', array(), 'Export'); - $this->tarball = $this->drupalGetContent(); + $this->tarball = $this->getRawContent(); $filename = file_directory_temp() .'/' . $this->randomMachineName(); file_put_contents($filename, $this->tarball); diff --git a/core/modules/config/src/Tests/ConfigExportUITest.php b/core/modules/config/src/Tests/ConfigExportUITest.php index fe3ae8d24840..1a679de644d2 100644 --- a/core/modules/config/src/Tests/ConfigExportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportUITest.php @@ -47,7 +47,7 @@ class ConfigExportUITest extends WebTestBase { $this->assertResponse(200, 'User can access the download callback.'); // Get the archived binary file provided to user for download. - $archive_data = $this->drupalGetContent(); + $archive_data = $this->getRawContent(); // Temporarily save the archive file. $uri = file_unmanaged_save_data($archive_data, 'temporary://config.tar.gz'); diff --git a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php index 0dd98bf60d55..196fa258a202 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php @@ -131,7 +131,7 @@ class ContentTranslationContextualLinksTest extends WebTestBase { $response = $this->renderContextualLinks(array('node:node=1:'), 'node/' . $node->id()); $this->assertResponse(200); $json = Json::decode($response); - $this->drupalSetContent($json['node:node=1:']); + $this->setRawContent($json['node:node=1:']); $this->assertLinkByHref($translate_link, 0, 'The contextual link to translate the node is shown.'); // Check that the link leads to the translate page. diff --git a/core/modules/datetime/src/Tests/DateTimeFieldTest.php b/core/modules/datetime/src/Tests/DateTimeFieldTest.php index 1f3a409d89d9..e2223dc016c7 100644 --- a/core/modules/datetime/src/Tests/DateTimeFieldTest.php +++ b/core/modules/datetime/src/Tests/DateTimeFieldTest.php @@ -491,7 +491,7 @@ class DateTimeFieldTest extends WebTestBase { $display = EntityViewDisplay::collectRenderDisplay($entity, $view_mode); $build = $display->build($entity); $output = drupal_render($build); - $this->drupalSetContent($output); + $this->setRawContent($output); $this->verbose($output); } diff --git a/core/modules/editor/src/Tests/EditorAdminTest.php b/core/modules/editor/src/Tests/EditorAdminTest.php index b151896bf1de..7ffa1222c2fb 100644 --- a/core/modules/editor/src/Tests/EditorAdminTest.php +++ b/core/modules/editor/src/Tests/EditorAdminTest.php @@ -54,9 +54,9 @@ class EditorAdminTest extends WebTestBase { $this->drupalGet('admin/config/content/formats/manage/filtered_html'); // Ensure the form field order is correct. - $roles_pos = strpos($this->drupalGetContent(), 'Roles'); - $editor_pos = strpos($this->drupalGetContent(), 'Text editor'); - $filters_pos = strpos($this->drupalGetContent(), 'Enabled filters'); + $roles_pos = strpos($this->getRawContent(), 'Roles'); + $editor_pos = strpos($this->getRawContent(), 'Text editor'); + $filters_pos = strpos($this->getRawContent(), 'Enabled filters'); $this->assertTrue($roles_pos < $editor_pos && $editor_pos < $filters_pos, '"Text Editor" select appears in the correct location of the text format configuration UI.'); // Verify the