You are here

public function RestrictIpServiceTest::whitelistedIpAddressesTestDataProvider in Restrict IP 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/Service/RestrictIpServiceTest.php \Drupal\Tests\restrict_ip\Unit\Service\RestrictIpServiceTest::whitelistedIpAddressesTestDataProvider()
  2. 3.x tests/src/Unit/Service/RestrictIpServiceTest.php \Drupal\Tests\restrict_ip\Unit\Service\RestrictIpServiceTest::whitelistedIpAddressesTestDataProvider()

* Data provider for testWhitelistedIpAddresses()

File

tests/src/Unit/Service/RestrictIpServiceTest.php, line 264

Class

RestrictIpServiceTest
@coversDefaultClass \Drupal\restrict_ip\Service\RestrictIpService @group restrict_ip

Namespace

Drupal\Tests\restrict_ip\Unit\Service

Code

public function whitelistedIpAddressesTestDataProvider() {
  return [
    [
      '::1',
      FALSE,
      'User is not blocked when IP address has been whitelisted in through admin interface',
    ],
    [
      '::2',
      TRUE,
      'User is blocked when IP address has not been whitelisted in through admin interface',
    ],
  ];
}