You are here

public function RequestTest::testGetClientIp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testGetClientIp()

@dataProvider testGetClientIpsProvider

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 859

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetClientIp($expected, $remoteAddr, $httpForwardedFor, $trustedProxies) {
  $request = $this
    ->getRequestInstanceForClientIpTests($remoteAddr, $httpForwardedFor, $trustedProxies);
  $this
    ->assertEquals($expected[0], $request
    ->getClientIp());
  Request::setTrustedProxies(array());
}