function DrupalHTTPResponseStatusLineTest::testStatusLine

Tests parsing HTTP response status line.

File

modules/simpletest/tests/common.test, line 1341

Class

DrupalHTTPResponseStatusLineTest
Tests parsing of the HTTP response status line.

Code

public function testStatusLine() {
    // Grab the big array of test data from statusLineData().
    $data = $this->statusLineData();
    foreach ($data as $test_case) {
        $test_data = array_shift($test_case);
        $expected = array_shift($test_case);
        $outcome = _drupal_parse_response_status($test_data);
        foreach (array_keys($expected) as $key) {
            $this->assertIdentical($outcome[$key], $expected[$key]);
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.