You are here

public function RestrictIpServiceTest::whitelistDataProvider in Restrict IP 8

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

* Data provider for testWhitelist()

File

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

Class

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

Namespace

Drupal\Tests\restrict_ip\Unit\Service

Code

public function whitelistDataProvider() {
  return [
    [
      '/node/1',
      TRUE,
      FALSE,
      'User is allowed on whitelisted path',
    ],
    [
      '/node/2',
      FALSE,
      TRUE,
      'User is blocked on non-whitelisted path',
    ],
  ];
}