function DrupalWebTestCase::assertRaw
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.
97 calls to DrupalWebTestCase::assertRaw()
- BlogTestCase::verifyBlogs in modules/
blog/ blog.test - Verify the logged in user has the desired access to the various blog nodes.
- BootstrapPageCacheTestCase::testPageCompression in modules/
simpletest/ tests/ bootstrap.test - Test page compression.
- CascadingStylesheetsTestCase::testAddCssFileWithQueryString in modules/
simpletest/ tests/ common.test - Tests that the query string remains intact when adding CSS files that have query string parameters.
- CascadingStylesheetsTestCase::testRenderInlineFullPage in modules/
simpletest/ tests/ common.test - Tests rendering inline stylesheets through a full page request.
- ContactPersonalTestCase::testPersonalContactFlood in modules/
contact/ contact.test - Tests the personal contact form flood protection.
File
-
modules/
simpletest/ drupal_web_test_case.php, line 3298
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function assertRaw($raw, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Raw "@raw" found', array(
'@raw' => $raw,
));
}
return $this->assert(strpos($this->drupalGetContent(), (string) $raw) !== FALSE, $message, $group);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.