public function RestfulRateLimitTestCase::testGlobalLimits in RESTful 7.2
Same name and namespace in other branches
- 7 tests/RestfulRateLimitTestCase.test \RestfulRateLimitTestCase::testGlobalLimits()
Tests global rate limits.
File
- tests/
RestfulRateLimitTestCase.test, line 40 - Contains RestfulRateLimitTestCase.
Class
Code
public function testGlobalLimits() {
// Test the global limit.
variable_set('restful_global_rate_limit', 1);
// P3D for 3 days period. See
// http://php.net/manual/en/class.dateinterval.php for more information
// about the interval format.
variable_set('restful_global_rate_period', 'P3D');
$account = $this
->drupalCreateUser();
$this
->roleExecute($account, 1, array(
'articles',
1,
0,
));
}