You are here

protected function DrupalWebTestCase::assertNoRaw in SimpleTest 7

Same name and namespace in other branches
  1. 6.2 drupal_web_test_case.php \DrupalWebTestCase::assertNoRaw()
  2. 7.2 drupal_web_test_case.php \DrupalWebTestCase::assertNoRaw()

Pass if the raw text is NOT found on the loaded page, fail otherwise. Raw text refers to the raw HTML that the page generated.

Parameters

$raw: Raw (HTML) string to look for.

$message: Message to display.

$group: The group this message belongs to, defaults to 'Other'.

Return value

TRUE on pass, FALSE on fail.

3 calls to DrupalWebTestCase::assertNoRaw()
DrupalErrorHandlerUnitTest::assertNoErrorMessage in tests/error.test
Helper function: assert that the error message is not found.
FileSaveUploadTest::testNoUpload in tests/file.test
Test for no failures when not uploading a file.
ThemeTableUnitTest::testThemeTableNoStickyHeaders in tests/theme.test
If $sticky is FALSE, no tableheader.js should be included.

File

./drupal_web_test_case.php, line 2001

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertNoRaw($raw, $message = '', $group = 'Other') {
  if (!$message) {
    $message = t('Raw "@raw" not found', array(
      '@raw' => $raw,
    ));
  }
  return $this
    ->assert(strpos($this->content, $raw) === FALSE, $message, $group);
}