1 common.test protected CommonBackdropHTTPResponseStatusLineTest::statusLineData()

Data provider for testStatusLine().

Return value

array: Test data.

File

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

Class

CommonBackdropHTTPResponseStatusLineTest
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',
      ),
    ),
  );
}