You are here

function DrupalTestCase::drupalRawPost in SimpleTest 5

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

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

Parameters

url string Url to retch:

Return value

void

File

./drupal_test_case.php, line 75

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 drupalRawPost($action, $edit = []) {
  $html = $this->_browser
    ->post($action, $edit);
  if ($this
    ->drupalCheckAuth(true)) {
    $html .= $this
      ->drupalCheckAuth();
  }
  $this->_content = $this->_browser
    ->getContent();
  return $html;
}