You are here

public function IpUtilsTest::testIpv6Provider in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/IpUtilsTest.php, line 55

Class

IpUtilsTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testIpv6Provider() {
  return array(
    array(
      true,
      '2a01:198:603:0:396e:4789:8e99:890f',
      '2a01:198:603:0::/65',
    ),
    array(
      false,
      '2a00:198:603:0:396e:4789:8e99:890f',
      '2a01:198:603:0::/65',
    ),
    array(
      false,
      '2a01:198:603:0:396e:4789:8e99:890f',
      '::1',
    ),
    array(
      true,
      '0:0:0:0:0:0:0:1',
      '::1',
    ),
    array(
      false,
      '0:0:603:0:396e:4789:8e99:0001',
      '::1',
    ),
    array(
      true,
      '2a01:198:603:0:396e:4789:8e99:890f',
      array(
        '::1',
        '2a01:198:603:0::/65',
      ),
    ),
    array(
      true,
      '2a01:198:603:0:396e:4789:8e99:890f',
      array(
        '2a01:198:603:0::/65',
        '::1',
      ),
    ),
    array(
      false,
      '2a01:198:603:0:396e:4789:8e99:890f',
      array(
        '::1',
        '1a01:198:603:0::/65',
      ),
    ),
  );
}