From 51753e403fa69c0ce124ede27d300477e3e799ca Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Mon, 3 Dec 2018 00:34:53 +0100 Subject: namespacing: move HTTP utilities along \Shaarli\Http\ classes Signed-off-by: VirtualTam --- tests/HttpUtils/ClientIpIdTest.php | 52 -------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 tests/HttpUtils/ClientIpIdTest.php (limited to 'tests/HttpUtils/ClientIpIdTest.php') diff --git a/tests/HttpUtils/ClientIpIdTest.php b/tests/HttpUtils/ClientIpIdTest.php deleted file mode 100644 index c15ac5cc..00000000 --- a/tests/HttpUtils/ClientIpIdTest.php +++ /dev/null @@ -1,52 +0,0 @@ -assertEquals( - '10.1.167.42', - client_ip_id(['REMOTE_ADDR' => '10.1.167.42']) - ); - } - - /** - * Get a remote client ID based on its IP and proxy information (1) - */ - public function testClientIpIdRemoteForwarded() - { - $this->assertEquals( - '10.1.167.42_127.0.1.47', - client_ip_id([ - 'REMOTE_ADDR' => '10.1.167.42', - 'HTTP_X_FORWARDED_FOR' => '127.0.1.47' - ]) - ); - } - - /** - * Get a remote client ID based on its IP and proxy information (2) - */ - public function testClientIpIdRemoteForwardedClient() - { - $this->assertEquals( - '10.1.167.42_10.1.167.56_127.0.1.47', - client_ip_id([ - 'REMOTE_ADDR' => '10.1.167.42', - 'HTTP_X_FORWARDED_FOR' => '10.1.167.56', - 'HTTP_CLIENT_IP' => '127.0.1.47' - ]) - ); - } -} -- cgit v1.2.3