From 482d67bd523bf12f36508a0131d09fe299ee02f4 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sun, 6 Sep 2015 21:31:37 +0200 Subject: HTTP: move server URL functions to `HttpUtils.php` Relates to #333 Modifications: - refactor server URL utility functions - do not access global `$_SERVER` variables - add test coverage - improve readability - apply coding conventions Signed-off-by: VirtualTam --- tests/HttpUtilsTest.php | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 tests/HttpUtilsTest.php (limited to 'tests/HttpUtilsTest.php') diff --git a/tests/HttpUtilsTest.php b/tests/HttpUtilsTest.php deleted file mode 100644 index 76092b80..00000000 --- a/tests/HttpUtilsTest.php +++ /dev/null @@ -1,38 +0,0 @@ -assertEquals('HTTP Error', $headers[0]); - $this->assertRegexp( - '/failed to open stream: No such file or directory/', - $content - ); - } - - /** - * Get an invalid remote URL - */ - public function testGetInvalidRemoteUrl() - { - list($headers, $content) = get_http_url('http://non.existent', 1); - $this->assertEquals('HTTP Error', $headers[0]); - $this->assertRegexp( - '/Name or service not known/', - $content - ); - } -} -- cgit v1.2.3