function DrupalWebTestCase::assertText

Pass if the text IS found 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.

369 calls to DrupalWebTestCase::assertText()
AccessDeniedTestCase::testAccessDenied in modules/system/system.test
ActionsConfigurationTestCase::testActionConfiguration in modules/simpletest/tests/actions.test
Test the configuration of advanced actions through the administration interface.
AddFeedTestCase::testAddFeed in modules/aggregator/aggregator.test
Creates and ensures that a feed is unique, checks source, and deletes feed.
AddFeedTestCase::testAddLongFeed in modules/aggregator/aggregator.test
Tests feeds with very long URLs.
AggregatorConfigurationTestCase::testSettingsPage in modules/aggregator/aggregator.test
Tests the settings form to ensure the correct default values are used.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 3339

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertText($text, $message = '', $group = 'Other') {
    return $this->assertTextHelper($text, $message, $group, FALSE);
}

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