protected function DrupalWebTestCase::assertNoPattern in SimpleTest 7.2
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalWebTestCase::assertNoPattern()
- 7 drupal_web_test_case.php \DrupalWebTestCase::assertNoPattern()
Will trigger a pass if the perl regex pattern is not present in 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
- ./
drupal_web_test_case.php, line 2927 - Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function assertNoPattern($pattern, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Pattern "@pattern" not found', array(
'@pattern' => $pattern,
));
}
return $this
->assert(!preg_match($pattern, $this
->drupalGetContent()), $message, $group);
}