You are here

function DrupalTestCase::drupalGet in SimpleTest 5

Same name and namespace in other branches
  1. 6 drupal_test_case.php \DrupalTestCase::drupalGet()

@abstract Brokder for the get function adds the authentication headers if necessary @author Earnest Berry III <earnest.berry@gmail.com>

Parameters

url string Url to retch:

Return value

void

5 calls to DrupalTestCase::drupalGet()
DrupalTestCase::drupalLoginUser in ./drupal_test_case.php
Logs in a user with the internal browser
DrupalTestCase::drupalPostRequest in ./drupal_test_case.php
Do a post request on a drupal page. It will be done as usual post request with SimpleBrowser
ImageModuleTest::testImageNode in tests/image_module.test
PageViewTest::testPageView in tests/page_view.test
TaxonomyTestNodeApi::testTaxonomyNode in tests/taxonomy.module.test

File

./drupal_test_case.php, line 55

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($url) {
  $html = $this->_browser
    ->get($url);
  if ($this
    ->drupalCheckAuth(true)) {
    $html .= $this
      ->drupalCheckAuth();
  }
  $this->_content = $this->_browser
    ->getContent();
  return $html;
}