public function RequestMatcherTest::testIpv4

@dataProvider testIpv4Provider

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php, line 22

Class

RequestMatcherTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testIpv4($matches, $remoteAddr, $cidr) {
  $request = Request::create('', 'get', array(), array(), array(), array(
    'REMOTE_ADDR' => $remoteAddr,
  ));
  $matcher = new RequestMatcher();
  $matcher
    ->matchIp($cidr);
  $this
    ->assertEquals($matches, $matcher
    ->matches($request));
}