function DrupalTestCase::drupalGet in SimpleTest 6
Same name and namespace in other branches
- 5 drupal_test_case.php \DrupalTestCase::drupalGet()
@abstract Broker for the get function adds the authentication headers if necessary @author Earnest Berry III <earnest.berry@gmail.com>
Parameters
$path string Drupal path or url to load into internal browser:
array $options Options to be forwarded to url().:
Return value
void
25 calls to DrupalTestCase::drupalGet()
- AddTopicToForum::testAddTopicToForum in tests/
forum_module.test - BlogAPIModuleTestCase::test_blog_API in tests/
blogapi_module.test - BookModuleTestCase::checkBookNode in tests/
book_module.test - Checks the outline of sub-pages; previous, up, and next; and check printer friendly version.
- BookModuleTestCase::testBook in tests/
book_module.test - Test book funcitonality through node interfaces.
- CommentModuleTestCase::get_unaproved_comment in tests/
comment_module.test - Get the comment id for an unaproved comment.
File
- ./
drupal_test_case.php, line 144
Class
- DrupalTestCase
- Test case for typical Drupal tests. Extends WebTestCase for comfortable browser usage but also implements all UnitTestCase methods, I wish WebTestCase would do this.
Code
function drupalGet($path, $options = []) {
$url = url($path, array_merge($options, array(
'absolute' => TRUE,
)));
$html = $this->_browser
->get($url);
if ($this
->drupalCheckAuth(true)) {
$html .= $this
->drupalCheckAuth();
}
$this->_content = $this->_browser
->getContent();
return $html;
}