Fix an off-by-one error in some timezones [MAILPOET-1186]

This commit is contained in:
stoletniy
2017-11-02 14:56:44 +03:00
parent 3fd4ef9985
commit 09a2dd231a

View File

@ -11,7 +11,7 @@ class ThrottlingTest extends \MailPoetTest {
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
expect(Throttling::throttle())->equals(false); expect(Throttling::throttle())->equals(false);
expect(Throttling::throttle())->equals(60); expect(Throttling::throttle())->equals(60);
for($i = 0; $i < 11; $i++) { for($i = 1; $i <= 10; $i++) {
$ip = SubscriberIP::create(); $ip = SubscriberIP::create();
$ip->ip = '127.0.0.1'; $ip->ip = '127.0.0.1';
$ip->created_at = Carbon::now()->subMinutes($i); $ip->created_at = Carbon::now()->subMinutes($i);