diff -u b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php --- b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php +++ b/core/modules/aggregator/tests/src/Functional/AddFeedTest.php @@ -64,7 +64,7 @@ $this->assertSession()->statusCodeEquals(200); $this->assertEscaped('Test feed title '); - $this->assertNoRaw('Test feed title '); + $this->assertSession()->responseNotContains('Test feed title '); // Ensure the feed icon title is escaped. $this->assertStringContainsString('class="feed-icon"> Subscribe to Test feed title <script>alert(123);</script> feed', str_replace(["\n", "\r"], '', $this->getSession()->getPage()->getContent())); diff -u b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php --- b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php +++ b/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php @@ -87,18 +87,18 @@ $this->drupalGet(Url::fromRoute('')); $this->assertSessionCookieExists(FALSE); $this->assertBigPipeNoJsCookieExists(FALSE); - $this->assertNoRaw('' . "\n" . ''); - $this->assertNoRaw($no_js_to_js_markup); + $this->assertSession()->responseNotContains($no_js_to_js_markup); $this->assertBigPipeNoJsMetaRefreshRedirect(); $this->assertBigPipeNoJsCookieExists(TRUE); - $this->assertNoRaw('' . "\n" . ''); - $this->assertNoRaw($no_js_to_js_markup); + $this->assertSession()->responseNotContains($no_js_to_js_markup); $this->assertBigPipeNoJsMetaRefreshRedirect(); $this->assertBigPipeNoJsCookieExists(TRUE); - $this->assertNoRaw(''; $this->assertSession()->responseContains('The count is 1.'); - $this->assertNoRaw('The count is 2.'); - $this->assertNoRaw('The count is 3.'); + $this->assertSession()->responseNotContains('The count is 2.'); + $this->assertSession()->responseNotContains('The count is 3.'); $raw_content = $this->getSession()->getPage()->getContent(); $this->assertTrue(substr_count($raw_content, $expected_placeholder_replacement) == 1, 'Only one placeholder replacement was found for the duplicate #lazy_builder arrays.'); @@ -317,8 +317,8 @@ $this->assertBigPipeNoJsCookieExists(TRUE); $this->drupalGet(Url::fromRoute('big_pipe_test_multi_occurrence')); $this->assertSession()->responseContains('The count is 1.'); - $this->assertNoRaw('The count is 2.'); - $this->assertNoRaw('The count is 3.'); + $this->assertSession()->responseNotContains('The count is 2.'); + $this->assertSession()->responseNotContains('The count is 3.'); } protected function assertBigPipeResponseHeadersPresent() { @@ -341,7 +341,7 @@ $this->assertSetsEqual(array_keys($expected_big_pipe_nojs_placeholders), array_map('rawurldecode', explode(' ', $this->drupalGetHeader('BigPipe-Test-No-Js-Placeholders')))); foreach ($expected_big_pipe_nojs_placeholders as $big_pipe_nojs_placeholder => $expected_replacement) { $this->pass('Checking whether the replacement for the BigPipe no-JS placeholder "' . $big_pipe_nojs_placeholder . '" is present:'); - $this->assertNoRaw($big_pipe_nojs_placeholder); + $this->assertSession()->responseNotContains($big_pipe_nojs_placeholder); if ($expected_replacement !== NULL) { $this->assertSession()->responseContains($expected_replacement); } @@ -374,7 +374,7 @@ $result = $this->xpath('//script[@data-big-pipe-replacement-for-placeholder-with-id=:id]', [':id' => Html::decodeEntities($big_pipe_placeholder_id)]); if ($expected_ajax_response === NULL) { $this->assertCount(0, $result); - $this->assertNoRaw($expected_placeholder_replacement); + $this->assertSession()->responseNotContains($expected_placeholder_replacement); continue; } $this->assertEqual($expected_ajax_response, trim($result[0]->getText())); @@ -490,7 +490,7 @@ $this->assertTrue(empty(array_diff(['cookies:big_pipe_nojs', 'session.exists'], explode(' ', $headers[0]['X-Drupal-Cache-Contexts'][0]))), 'The first response varies by the "cookies:big_pipe_nojs" and "session.exists" cache contexts.'); $this->assertEqual('no-store, content="BigPipe/1.0"', $headers[1]['Surrogate-Control'][0], 'The second response has a "Surrogate-Control" header.'); - $this->assertNoRaw('' . \Drupal::currentUser()->getAccountName() . ''; $this->drupalGet(''); $this->assertNoText('Test context-aware block'); - $this->assertNoRaw($expected_text); + $this->assertSession()->responseNotContains($expected_text); $block_url = 'admin/structure/block/add/test_context_aware/classy'; $arguments = [ @@ -275,7 +275,7 @@ // Tests that conditions with missing context are not displayed. $this->drupalGet('admin/structure/block/manage/testcontextawareblock'); - $this->assertNoRaw('No existing type'); + $this->assertSession()->responseNotContains('No existing type'); $this->assertNoFieldByXPath('//*[@name="visibility[condition_test_no_existing_type][negate]"]'); } diff -u b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php --- b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php @@ -264,7 +264,7 @@ $edit2['body[0][value]'] = $body2; $this->drupalPostForm('block/add/basic', $edit2, t('Save')); - $this->assertNoRaw('Error message'); + $$this->assertSession()->responseNotContains(t('Error message')); // Create another block with no instances, and test we don't get a // confirmation message about deleting instances. diff -u b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php --- b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php +++ b/core/modules/color/tests/src/Functional/ColorSafePreviewTest.php @@ -55,7 +55,7 @@ $this->drupalGet($url); $this->assertText('TEST COLOR PREVIEW'); - $this->assertNoRaw(''); + $this->assertSession()->responseNotContains(''); $this->assertSession()->responseContains('TEST COLOR PREVIEW'); } diff -u b/core/modules/color/tests/src/Functional/ColorTest.php b/core/modules/color/tests/src/Functional/ColorTest.php --- b/core/modules/color/tests/src/Functional/ColorTest.php +++ b/core/modules/color/tests/src/Functional/ColorTest.php @@ -207,7 +207,7 @@ $this->drupalPlaceBlock('system_branding_block', ['region' => 'header']); $this->drupalGet(''); - $this->assertNoRaw('files/color/bartik-', 'Make sure the color logo is not being used.'); + $this->assertSession()->responseNotContains('files/color/bartik-', 'Make sure the color logo is not being used.'); $this->assertSession()->responseContains('bartik/logo.svg', 'Make sure the original bartik logo exists.'); // Log in and set the color scheme to 'slate'. @@ -219,7 +219,7 @@ $this->drupalLogout(); $this->drupalGet(''); $this->assertSession()->responseContains('files/color/bartik-', 'Make sure the color logo is being used.'); - $this->assertNoRaw('bartik/logo.svg', 'Make sure the original bartik logo does not exist.'); + $this->assertSession()->responseNotContains('bartik/logo.svg', 'Make sure the original bartik logo does not exist.'); // Log in and set the color scheme back to default (delete config). $this->drupalLogin($this->bigUser); @@ -229,7 +229,7 @@ // Log out and ensure there is no color and we have the original logo. $this->drupalLogout(); $this->drupalGet(''); - $this->assertNoRaw('files/color/bartik-', 'Make sure the color logo is not being used.'); + $this->assertSession()->responseNotContains('files/color/bartik-', 'Make sure the color logo is not being used.'); $this->assertSession()->responseContains('bartik/logo.svg', 'Make sure the original bartik logo exists.'); } diff -u b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php --- b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php +++ b/core/modules/comment/tests/src/Functional/CommentAnonymousTest.php @@ -157,7 +157,7 @@ $this->performCommentOperation($anonymous_comment3, 'delete'); $this->drupalGet('admin/content/comment'); - $this->assertNoRaw('comments[' . $anonymous_comment3->id() . ']', 'Comment was deleted.'); + $this->assertSession()->responseNotContains('comments[' . $anonymous_comment3->id() . ']', 'Comment was deleted.'); $this->drupalLogout(); // Comment 3 was deleted. diff -u b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php --- b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +++ b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php @@ -344,7 +344,7 @@ // mode this time. $comment_element = $this->cssSelect('.comment-wrapper'); $this->assertTrue(!empty($comment_element)); - $this->assertNoRaw('' . $comment_text . ''); + $this->assertSession()->responseNotContains('' . $comment_text . ''); } } diff -u b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php --- b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php +++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php @@ -323,7 +323,7 @@ // Delete the comment. $this->performCommentOperation($comment1, 'delete'); $this->drupalGet('admin/content/comment'); - $this->assertNoRaw('comments[' . $comment1->id() . ']', 'Comment was deleted.'); + $this->assertSession()->responseNotContains('comments[' . $comment1->id() . ']', 'Comment was deleted.'); // Post another comment. $comment1 = $this->postComment($this->entity, $this->randomMachineName(), $this->randomMachineName()); diff -u b/core/modules/comment/tests/src/Functional/CommentRssTest.php b/core/modules/comment/tests/src/Functional/CommentRssTest.php --- b/core/modules/comment/tests/src/Functional/CommentRssTest.php +++ b/core/modules/comment/tests/src/Functional/CommentRssTest.php @@ -78,7 +78,7 @@ $this->node->set('comment', CommentItemInterface::HIDDEN); $this->node->save(); $this->drupalGet('rss.xml'); - $this->assertNoRaw($raw, 'Hidden comments is not a part of RSS feed.'); + $this->assertSession()->responseNotContains($raw, 'Hidden comments is not a part of RSS feed.'); } } diff -u b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php --- b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php @@ -273,11 +273,11 @@ // Item 51 should not be present. $this->assertSession()->responseContains('Test config entity 50', 'Config entity 50 is shown.'); - $this->assertNoRaw('Test config entity 51', 'Config entity 51 is on the next page.'); + $this->assertSession()->responseNotContains('Test config entity 51', 'Config entity 51 is on the next page.'); // Browse to the next page. $this->clickLink(t('Page 2')); - $this->assertNoRaw('Test config entity 50', 'Test config entity 50 is on the previous page.'); + $this->assertSession()->responseNotContains('Test config entity 50', 'Test config entity 50 is on the previous page.'); $this->assertSession()->responseContains('dotted.default', 'Default config entity appears on page 2.'); $this->assertSession()->responseContains('Test config entity 51', 'Test config entity 51 is on page 2.'); } diff -u b/core/modules/config/tests/src/Functional/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php --- b/core/modules/config/tests/src/Functional/ConfigEntityTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php @@ -255,7 +255,7 @@ $this->assertUrl('admin/structure/config_test'); $this->assertSession()->statusCodeEquals(200); $this->assertSession()->responseContains($message_insert); - $this->assertNoRaw($message_update); + $this->assertSession()->responseNotContains($message_update); $this->assertLinkByHref("admin/structure/config_test/manage/$id"); // Update the configuration entity. @@ -265,7 +265,7 @@ $this->drupalPostForm("admin/structure/config_test/manage/$id", $edit, 'Save'); $this->assertUrl('admin/structure/config_test'); $this->assertSession()->statusCodeEquals(200); - $this->assertNoRaw($message_insert); + $this->assertSession()->responseNotContains($message_insert); $this->assertSession()->responseContains($message_update); $this->assertLinkByHref("admin/structure/config_test/manage/$id"); $this->assertLinkByHref("admin/structure/config_test/manage/$id/delete"); @@ -277,7 +277,7 @@ $this->drupalPostForm(NULL, [], 'Delete'); $this->assertUrl('admin/structure/config_test'); $this->assertSession()->statusCodeEquals(200); - $this->assertNoRaw($message_update); + $this->assertSession()->responseNotContains($message_update); $this->assertSession()->responseContains($message_delete); $this->assertNoText($label1); $this->assertNoLinkByHref("admin/structure/config_test/manage/$id"); diff -u b/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php --- b/core/modules/config/tests/src/Functional/ConfigImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php @@ -130,11 +130,11 @@ // Import and verify that both do not appear anymore. $this->drupalPostForm(NULL, [], t('Import all')); - $this->assertNoRaw('' . $name); - $this->assertNoRaw('' . $dynamic_name); - $this->assertNoRaw('core.extension'); - $this->assertNoRaw('system.theme'); - $this->assertNoRaw('automated_cron.settings'); + $this->assertSession()->responseNotContains('' . $name); + $this->assertSession()->responseNotContains('' . $dynamic_name); + $this->assertSession()->responseNotContains('core.extension'); + $this->assertSession()->responseNotContains('system.theme'); + $this->assertSession()->responseNotContains('automated_cron.settings'); $this->assertNoFieldById('edit-submit', t('Import all')); @@ -201,9 +201,9 @@ // Import and verify that both do not appear anymore. $this->drupalPostForm(NULL, [], t('Import all')); - $this->assertNoRaw('core.extension'); - $this->assertNoRaw('system.theme'); - $this->assertNoRaw('automated_cron.settings'); + $this->assertSession()->responseNotContains('core.extension'); + $this->assertSession()->responseNotContains('system.theme'); + $this->assertSession()->responseNotContains('automated_cron.settings'); $this->rebuildContainer(); $this->assertFalse(\Drupal::moduleHandler()->moduleExists('ban'), 'Ban module uninstalled during import.'); @@ -300,7 +300,7 @@ // Load the diff UI and verify that the diff reflects the change. $this->drupalGet('admin/config/development/configuration/sync/diff/' . $config_name); - $this->assertNoRaw(' '); + $this->assertSession()->responseNotContains(' '); $this->assertSession()->titleEquals("View changes of $config_name | Drupal"); // The following assertions do not use $this::assertEscaped() because @@ -483,7 +483,7 @@ // Delete the node and try to import again. $node->delete(); $this->drupalPostForm(NULL, [], t('Import all')); - $this->assertNoRaw($validation_message); + $this->assertSession()->responseNotContains($validation_message); $this->assertText(t('There are no configuration changes to import.')); $this->assertNoText(new FormattableMarkup('node.type.@type', ['@type' => $node_type->id()])); $this->assertNoText(new FormattableMarkup('field.field.node.@type.body', ['@type' => $node_type->id()])); diff -u b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php --- b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -671,7 +671,7 @@ $this->assertSession()->responseContains('edit-source-config-names-viewsviewfiles-display-default-display-options-fields-count-format-plural-string-' . $index); } else { - $this->assertNoRaw('edit-source-config-names-viewsviewfiles-display-default-display-options-fields-count-format-plural-string-' . $index); + $this->assertSession()->responseNotContains('edit-source-config-names-viewsviewfiles-display-default-display-options-fields-count-format-plural-string-' . $index); } } } diff -u b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php --- b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php +++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php @@ -107,7 +107,7 @@ ]; $this->assertSession()->responseContains(new FormattableMarkup('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders)); // Ensure an unescaped version of the email does not exist anywhere. - $this->assertNoRaw($this->webUser->getEmail()); + $this->assertSession()->responseNotContains($this->webUser->getEmail()); } /** diff -u b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php --- b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationEnableTest.php @@ -45,7 +45,7 @@ $this->drupalGet('admin/config/regional/content-language'); // The node entity type should not be an option because it has no bundles. - $this->assertNoRaw('entity_types[node]'); + $this->assertSession()->responseNotContains('entity_types[node]'); // Enable content translation on entity types that have will have a // content_translation_uid. $edit = [ diff -u b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php --- b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php @@ -115,7 +115,7 @@ // Assert that HTML is not escaped unexpectedly. if ($this->testHTMLEscapeForAllLanguages) { - $this->assertNoRaw('<span class="translation-entity-all-languages">(all languages)</span>'); + $this->assertSession()->responseNotContains('<span class="translation-entity-all-languages">(all languages)</span>'); $this->assertSession()->responseContains('(all languages)'); } diff -u b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php --- b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -78,7 +78,7 @@ $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id])); $this->assertSession()->responseContains($date->format($date_format)); - $this->assertNoRaw($date->format($time_format)); + $this->assertSession()->responseNotContains($date->format($time_format)); // Verify the date doesn't change if using a timezone that is UTC+12 when // the entity is edited through the form. diff -u b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php --- b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php +++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php @@ -94,9 +94,9 @@ $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id])); $this->assertSession()->responseContains($start_date->format($date_format)); - $this->assertNoRaw($start_date->format($time_format)); + $this->assertSession()->responseNotContains($start_date->format($time_format)); $this->assertSession()->responseContains($end_date->format($date_format)); - $this->assertNoRaw($end_date->format($time_format)); + $this->assertSession()->responseNotContains($end_date->format($time_format)); // Verify the date doesn't change when entity is edited through the form. $entity = EntityTest::load($id); @@ -500,9 +500,9 @@ $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id])); $this->assertSession()->responseContains($start_date->format($date_format)); - $this->assertNoRaw($start_date->format($time_format)); + $this->assertSession()->responseNotContains($start_date->format($time_format)); $this->assertSession()->responseContains($end_date->format($date_format)); - $this->assertNoRaw($end_date->format($time_format)); + $this->assertSession()->responseNotContains($end_date->format($time_format)); /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */ $display_repository = \Drupal::service('entity_display.repository'); diff -u b/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php --- b/core/modules/dblog/tests/src/Functional/DbLogTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php @@ -824,13 +824,13 @@ $this->assertSession()->statusCodeEquals(200); // Make sure HTML tags are filtered out. $this->assertSession()->responseContains('title="alert('foo');Lorem'); - $this->assertNoRaw(""); + $this->assertSession()->responseNotContains(""); // Make sure HTML tags are filtered out in admin/reports/dblog/event/ too. $this->generateLogEntries(1, ['message' => " Lorem ipsum"]); $wid = Database::getConnection()->query('SELECT MAX(wid) FROM {watchdog}')->fetchField(); $this->drupalGet('admin/reports/dblog/event/' . $wid); - $this->assertNoRaw(""); + $this->assertSession()->responseNotContains(""); $this->assertSession()->responseContains("alert('foo'); Lorem ipsum"); } diff -u b/core/modules/editor/tests/src/Functional/EditorAdminTest.php b/core/modules/editor/tests/src/Functional/EditorAdminTest.php --- b/core/modules/editor/tests/src/Functional/EditorAdminTest.php +++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php @@ -203,7 +203,7 @@ $this->assertTrue(($options[1]->getText()) === 'Unicorn Editor', 'Option 2 in the Text Editor select is "Unicorn Editor".'); $this->assertTrue($options[0]->hasAttribute('selected'), 'Option 1 ("None") is selected.'); // Ensure the none option is selected. - $this->assertNoRaw('This option is disabled because no modules that provide a text editor are currently enabled.', 'Description for select absent that tells users to install a text editor module.'); + $this->assertSession()->responseNotContains('This option is disabled because no modules that provide a text editor are currently enabled.', 'Description for select absent that tells users to install a text editor module.'); // Select the "Unicorn Editor" editor and click the "Configure" button. $edit = [ diff -u b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php --- b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php +++ b/core/modules/editor/tests/src/Functional/EditorUploadImageScaleTest.php @@ -87,7 +87,7 @@ list($uploaded_image_file_width, $uploaded_image_file_height) = $this->uploadImage($test_image->uri); $this->assertEqual($uploaded_image_file_width, $image_file_width); $this->assertEqual($uploaded_image_file_height, $image_file_height); - $this->assertNoRaw((string) new FormattableMarkup('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', ['%dimensions' => $max_width . 'x' . $max_height])); + $this->assertSession()->responseNotContains((string) new FormattableMarkup('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', ['%dimensions' => $max_width . 'x' . $max_height])); // Case 2: max width smaller than uploaded image: image scaled down. $test_image = $testing_image_list[1]; @@ -123,7 +123,7 @@ list($uploaded_image_file_width, $uploaded_image_file_height) = $this->uploadImage($test_image->uri); $this->assertEqual($uploaded_image_file_width, $image_file_width); $this->assertEqual($uploaded_image_file_height, $image_file_height); - $this->assertNoRaw((string) new FormattableMarkup('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', ['%dimensions' => $max_width . 'x' . $max_height])); + $this->assertSession()->responseNotContains((string) new FormattableMarkup('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', ['%dimensions' => $max_width . 'x' . $max_height])); // Case 5: only max width dimension was provided and it was smaller than // uploaded image: image scaled down. diff -u b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php --- b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php +++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php @@ -108,7 +108,7 @@ $this->drupalGet('entity_test/add'); $this->assertFieldByName("{$field_name}[value]", '', 'Widget found.'); $this->assertText($this->field->label(), 'Uses field label by default.'); - $this->assertNoRaw($on, 'Does not use the "On" label.'); + $this->assertSession()->responseNotContains($on, 'Does not use the "On" label.'); // Submit and ensure it is accepted. $edit = [ diff -u b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php --- b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php +++ b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php @@ -432,7 +432,7 @@ ]; $this->drupalPostForm($field_configuration_url, $edit, t('Save settings')); // Check if an error message is shown. - $this->assertNoRaw(t('%name is not a valid number.', ['%name' => t('Minimum')]), 'Saved ' . gettype($minimum_value) . ' value as minimal value on a ' . $field->getType() . ' field'); + $this->assertSession()->responseNotContains(t('%name is not a valid number.', ['%name' => t('Minimum')]), 'Saved ' . gettype($minimum_value) . ' value as minimal value on a ' . $field->getType() . ' field'); // Check if a success message is shown. $this->assertSession()->responseContains(t('Saved %label configuration.', ['%label' => $field->getLabel()])); // Check if the minimum value was actually set.
' . $comment_text . '