]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/HttpUtils/ClientIpIdTest.php
namespacing: move HTTP utilities along \Shaarli\Http\ classes
[github/shaarli/Shaarli.git] / tests / HttpUtils / ClientIpIdTest.php
diff --git a/tests/HttpUtils/ClientIpIdTest.php b/tests/HttpUtils/ClientIpIdTest.php
deleted file mode 100644 (file)
index c15ac5c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * HttpUtils' tests
- */
-
-require_once 'application/HttpUtils.php';
-
-/**
- * Unitary tests for client_ip_id()
- */
-class ClientIpIdTest extends PHPUnit_Framework_TestCase
-{
-    /**
-     * Get a remote client ID based on its IP
-     */
-    public function testClientIpIdRemote()
-    {
-        $this->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'
-            ])
-        );
-    }
-}