protected function DrupalWebTestCase::assertNoPattern

7.x drupal_web_test_case.php protected DrupalWebTestCase::assertNoPattern($pattern, $message = '', $group = 'Other')

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.

4 calls to DrupalWebTestCase::assertNoPattern()
CommentAnonymous::testAnonymous in drupal-7.x/modules/comment/comment.test
Test anonymous comment functionality.
ImageFieldDisplayTestCase::testImageFieldDefaultImage in drupal-7.x/modules/image/image.test
Test use of a default image with an image field.
TaxonomyTermTestCase::testTermInterface in drupal-7.x/modules/taxonomy/taxonomy.test
Save, edit and delete a term using the user interface.
TrackerTest::testTrackerNewNodes in drupal-7.x/modules/tracker/tracker.test
Tests for the presence of the "new" flag for nodes.

File

drupal-7.x/modules/simpletest/drupal_web_test_case.php, line 3118

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);
}