Commit fadcc4f9 authored by Dries's avatar Dries
Browse files

- Patch #295564 by mustafau, Damien Tournoud et al: drupal_http_rqeuest triggers error.

parent 39519985
......@@ -130,10 +130,17 @@ class DrupalHTTPRequestTestCase extends DrupalWebTestCase {
function testDrupalHTTPRequest() {
// Parse URL schema.
$missing_scheme = drupal_http_request('');
$this->assertEqual($missing_scheme->error, 'missing schema', t('Returned with missing scheme error.'));
$unable_to_parse = drupal_http_request('http:///path');
$this->assertEqual($unable_to_parse->error, 'unable to parse URL', t('Returned with unable to parse URL error.'));
// Fetch page.
$result = drupal_http_request(url('node', array('absolute' => TRUE)));
$this->assertEqual($result->code, 200, t('Fetched page successfully.'));
$this->assertTitle(variable_get('site_name', 'Drupal'), t('Site title matches.'));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment