You are here

protected function AssertLegacyTrait::assertPattern in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertPattern()

Triggers a pass if the Perl regex pattern is found in the raw content.

Parameters

string $pattern: Perl regex to look for including the regex delimiters.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->responseMatches() instead.

23 calls to AssertLegacyTrait::assertPattern()
ColorTest::_testColor in core/modules/color/tests/src/Functional/ColorTest.php
Tests the Color module functionality using the given theme.
CommentAnonymousTest::testAnonymous in core/modules/comment/tests/src/Functional/CommentAnonymousTest.php
Tests anonymous comment functionality.
CommentInterfaceTest::testCommentInterface in core/modules/comment/tests/src/Functional/CommentInterfaceTest.php
Tests the comment interface.
CommentNonNodeTest::testCommentFunctionality in core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
Tests anonymous comment functionality.
CommentTitleTest::testCommentEmptyTitles in core/modules/comment/tests/src/Functional/CommentTitleTest.php
Tests markup for comments with empty titles.

... See full list

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 687

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertPattern($pattern) {
  $this
    ->assertSession()
    ->responseMatches($pattern);
}