6 require_once 'application/HttpUtils.php';
9 * Unitary tests for get_http_url()
11 class GetHttpUrlTest
extends PHPUnit_Framework_TestCase
14 * Get an invalid local URL
16 public function testGetInvalidLocalUrl()
18 list($headers, $content) = get_http_url('/non/existent', 1);
19 $this->assertEquals('HTTP Error', $headers[0]);
21 '/failed to open stream: No such file or directory/',
27 * Get an invalid remote URL
29 public function testGetInvalidRemoteUrl()
31 list($headers, $content) = get_http_url('http://non.existent', 1);
32 $this->assertEquals('HTTP Error', $headers[0]);
34 '/Name or service not known/',