1 backdrop_web_test_case.php protected BackdropWebTestCase::assertPattern($pattern, $message = '', $group = 'Other')

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

Parameters

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

$message: Message to display.

$group: The group this message belongs to.

Return value

TRUE on pass, FALSE on fail.:

File

core/modules/simpletest/backdrop_web_test_case.php, line 3404

Class

BackdropWebTestCase
Test case for typical Backdrop tests.

Code

protected function assertPattern($pattern, $message = '', $group = 'Other') {
  if (!$message) {
    $message = t('Pattern "@pattern" found', array('@pattern' => $pattern));
  }
  return $this->assert((bool) preg_match($pattern, $this->backdropGetContent()), $message, $group);
}