function DrupalWebTestCase::assertUniqueText

Pass if the text is found ONLY ONCE on the text version of the page.

The text version is the equivalent of what a user would see when viewing through a web browser. In other words the HTML has been filtered out of the contents.

Parameters

$text: Plain text 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.

2 calls to DrupalWebTestCase::assertUniqueText()
UpdateCoreTestCase::testServiceUnavailable in modules/update/update.test
Tests the Update Manager module when the update server returns 503 errors.
UpdateTestContribCase::testUpdateBrokenFetchURL in modules/update/update.test
Makes sure that if we fetch from a broken URL, sane things happen.

File

modules/simpletest/drupal_web_test_case.php, line 3403

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertUniqueText($text, $message = '', $group = 'Other') {
    return $this->assertUniqueTextHelper($text, $message, $group, TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.