protected 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.


$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.

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

... See full list


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


Test case for typical Drupal tests.


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