| 7 drupal_web_test_case.php | protected DrupalWebTestCase::assertRaw($raw, $message = '', $group = 'Other') |
Pass if the raw text IS 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.
File
- modules/
simpletest/ drupal_web_test_case.php, line 2765
Code
protected function assertRaw($raw, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Raw "@raw" found', array('@raw' => $raw));
}
return $this->assert(strpos($this->drupalGetContent(), $raw) !== FALSE, $message, $group);
}
Login or register to post comments
Comments
Please Provide an Example in each version
Instead of the above given code from drupal_web_test_case.php, an example for how to use each method could be provided, It would be very useful for drupal learners, Kindly give an example for each method.