diff --git a/core/modules/system/tests/src/Functional/System/SiteInformationFormTest.php b/core/modules/system/tests/src/Functional/System/SiteInformationFormTest.php index e5083c9de1..1cdcea8999 100644 --- a/core/modules/system/tests/src/Functional/System/SiteInformationFormTest.php +++ b/core/modules/system/tests/src/Functional/System/SiteInformationFormTest.php @@ -33,14 +33,14 @@ public function testSloganSize() { 'site_slogan' => $this->randomMachineName($slogan_maxlength), ]; $this->drupalPostForm('admin/config/system/site-information', $edit, 'Save configuration'); - $this->assertSession()->responseContains('The configuration options have been saved.'); + $this->assertSession()->pageTextContains('The configuration options have been saved.'); $edit = [ 'site_slogan' => $this->randomMachineName($slogan_maxlength + 1), ]; $this->drupalPostForm('admin/config/system/site-information', $edit, 'Save configuration'); - $expected_error = sprintf('Slogan cannot be longer than %d characters but is currently %d characters long.', $slogan_maxlength, $slogan_maxlength + 1); - $this->assertSession()->responseContains($expected_error); + $expected_error = sprintf('Slogan cannot be longer than %d characters but is currently %d characters long.', $slogan_maxlength, $slogan_maxlength + 1); + $this->assertSession()->pageTextContains($expected_error); } }