protected function DrupalWebTestCase::assertPattern
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.
24 calls to DrupalWebTestCase::assertPattern()
- BatchProcessingTestCase::assertBatchMessages in drupal-7.x/
modules/ simpletest/ tests/ batch.test - Will trigger a pass if the texts were found in order in the raw content.
- BatchProcessingTestCase::assertBatchMessages in drupal-7.x/
modules/ simpletest/ tests/ batch.test - Will trigger a pass if the texts were found in order in the raw content.
- BookTestCase::checkBookNode in drupal-7.x/
modules/ book/ book.test - Checks the outline of sub-pages; previous, up, and next.
- BookTestCase::checkBookNode in drupal-7.x/
modules/ book/ book.test - Checks the outline of sub-pages; previous, up, and next.
- ColorTestCase::_testColor in drupal-7.x/
modules/ color/ color.test - Tests the Color module functionality using the given theme.
Archivo
- drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php, line 3079
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Código
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->drupalGetContent()), $message, $group);
}