You are here

protected function DrupalHTTPResponseStatusLineTest::statusLineData in Drupal 7

Data provider for testStatusLine().

Return value

array Test data.

1 call to DrupalHTTPResponseStatusLineTest::statusLineData()
DrupalHTTPResponseStatusLineTest::testStatusLine in modules/simpletest/tests/common.test
Tests parsing HTTP response status line.

File

modules/simpletest/tests/common.test, line 1270
Tests for common.inc functionality.

Class

DrupalHTTPResponseStatusLineTest
Tests parsing of the HTTP response status line.

Code

protected function statusLineData() {
  return array(
    array(
      'HTTP/1.1 200 OK',
      array(
        'http_version' => 'HTTP/1.1',
        'response_code' => '200',
        'reason_phrase' => 'OK',
      ),
    ),
    // Data set with no reason phrase.
    array(
      'HTTP/1.1 200',
      array(
        'http_version' => 'HTTP/1.1',
        'response_code' => '200',
        'reason_phrase' => '',
      ),
    ),
    // Arbitrary strings.
    array(
      'version code multi word explanation',
      array(
        'http_version' => 'version',
        'response_code' => 'code',
        'reason_phrase' => 'multi word explanation',
      ),
    ),
  );
}