public function DrupalHTTPResponseStatusLineTest::testStatusLine in Drupal 7
Tests parsing HTTP response status line.
File
- modules/
simpletest/ tests/ common.test, line 1249 - Tests for common.inc functionality.
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]);
}
}
}