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/modules/comment/comment.test
Test anonymous comment functionality.
ImageFieldDisplayTestCase::testImageFieldDefaultImage in drupal/modules/image/image.test
Test use of a default image with an image field.
TaxonomyTermTestCase::testTermInterface in drupal/modules/taxonomy/taxonomy.test
Save, edit and delete a term using the user interface.
TrackerTest::testTrackerNewNodes in drupal/modules/tracker/tracker.test
Tests for the presence of the "new" flag for nodes.

File

drupal/modules/simpletest/drupal_web_test_case.php, line 3098

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