diff --git a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php index 1331f34..5785a7d 100644 --- a/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php +++ b/core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php @@ -277,76 +277,6 @@ protected function assertNoRaw($raw) { } /** - * Passes if the text is found only once on the text version of the page. - * - * The text version is the equivalent of what a user would see when viewing - * through a web browser. In other words the HTML has been filtered out of - * the contents. - * - * @param string|\Drupal\Component\Render\MarkupInterface $text - * Plain text to look for. - * @param string $message - * (optional) A message to display with the assertion. Do not translate - * messages with t(). If left blank, a default message will be displayed. - * - * @deprecated Scheduled for removal in Drupal 9.0.0. - * Use $this->getSession()->getPage()->getText() and substr_count() instead. - */ - protected function assertUniqueText($text, $message = NULL) { - // Cast MarkupInterface objects to string. - $text = (string) $text; - - $message = $message ?: "'$text' found only once on the page"; - $page_text = $this->getSession()->getPage()->getText(); - $occurrences = substr_count($page_text, $text); - $this->assertSame(1, $occurrences, $message); - } - - /** - * Passes if the text is found more than once on the text version of the page. - * - * The text version is the equivalent of what a user would see when viewing - * through a web browser. In other words the HTML has been filtered out of - * the contents. - * - * @param string|\Drupal\Component\Render\MarkupInterface $text - * Plain text to look for. - * @param string $message - * (optional) A message to display with the assertion. Do not translate - * messages with t(). If left blank, a default message will be displayed. - * - * @deprecated Scheduled for removal in Drupal 9.0.0. - * Use $this->getSession()->getPage()->getText() and substr_count() instead. - */ - protected function assertNoUniqueText($text, $message = '') { - // Cast MarkupInterface objects to string. - $text = (string) $text; - - $message = $message ?: "'$text' found more than once on the page"; - $page_text = $this->getSession()->getPage()->getText(); - $occurrences = substr_count($page_text, $text); - $this->assertGreaterThan(1, $occurrences, $message); - } - - /** - * Triggers a pass if the Perl regex pattern is found in the raw content. - * - * @param string $pattern - * Perl regex to look for including the regex delimiters. - * @param string $message - * (optional) A message to display with the assertion. Do not translate - * messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed - * variables in the message text, not t(). If left blank, a default message - * will be displayed. - * - * @deprecated Scheduled for removal in Drupal 9.0.0. - * Use $this->assertSession()->responseMatches() instead. - */ - protected function assertPattern($pattern, $message = '') { - $this->assertSession()->responseMatches($pattern); - } - - /** * Pass if the page title is the given string. * * @param string $expected_title