public function ApiRateLimitCheckTest::apiRateLimitProvider in CloudFlare 8
Data provider for validating ApiRateLimitCheck.
Return value
array[] Returns per data set an array with:
- count of daily tag purge requests
- expected status returned by diagnostic check
File
- modules/
cloudflarepurger/ tests/ src/ Unit/ ApiRateLimitCheckTest.php, line 45
Class
- ApiRateLimitCheckTest
- Tests that purge_requirements() passes on our diagnostic checks.
Namespace
Drupal\Tests\cloudflarepurger\UnitCode
public function apiRateLimitProvider() {
return [
[
NULL,
DiagnosticCheckInterface::SEVERITY_OK,
],
[
0,
DiagnosticCheckInterface::SEVERITY_OK,
],
[
1,
DiagnosticCheckInterface::SEVERITY_OK,
],
[
500,
DiagnosticCheckInterface::SEVERITY_OK,
],
[
899,
DiagnosticCheckInterface::SEVERITY_OK,
],
[
900,
DiagnosticCheckInterface::SEVERITY_WARNING,
],
[
901,
DiagnosticCheckInterface::SEVERITY_WARNING,
],
[
1199,
DiagnosticCheckInterface::SEVERITY_WARNING,
],
[
1200,
DiagnosticCheckInterface::SEVERITY_ERROR,
],
[
1220,
DiagnosticCheckInterface::SEVERITY_ERROR,
],
];
}