|
4 | 4 |
|
5 | 5 | namespace Tests\Controllers;
|
6 | 6 |
|
| 7 | +use CodeIgniter\CodeIgniter; |
7 | 8 | use CodeIgniter\Config\Factories;
|
8 | 9 | use CodeIgniter\I18n\Time;
|
9 | 10 | use CodeIgniter\Shield\Authentication\Actions\Email2FA;
|
@@ -64,7 +65,11 @@ public function testLoginBadEmail(): void
|
64 | 65 |
|
65 | 66 | public function testLoginActionEmailSuccess(): void
|
66 | 67 | {
|
67 |
| - Time::setTestNow('March 10, 2017', 'America/Chicago'); |
| 68 | + if (version_compare(CodeIgniter::CI_VERSION, '4.3.0', '>=')) { |
| 69 | + Time::setTestNow('March 10, 2017', 'UTC'); |
| 70 | + } else { |
| 71 | + Time::setTestNow('March 10, 2017', 'America/Chicago'); |
| 72 | + } |
68 | 73 |
|
69 | 74 | $this->user->createEmailIdentity([
|
70 | 75 |
|
@@ -116,7 +121,11 @@ public function testAfterLoggedInNotDisplayLoginPage(): void
|
116 | 121 |
|
117 | 122 | public function testLoginActionUsernameSuccess(): void
|
118 | 123 | {
|
119 |
| - Time::setTestNow('March 10, 2017', 'America/Chicago'); |
| 124 | + if (version_compare(CodeIgniter::CI_VERSION, '4.3.0', '>=')) { |
| 125 | + Time::setTestNow('March 10, 2017', 'UTC'); |
| 126 | + } else { |
| 127 | + Time::setTestNow('March 10, 2017', 'America/Chicago'); |
| 128 | + } |
120 | 129 |
|
121 | 130 | // Add 'username' to $validFields
|
122 | 131 | $authConfig = config('Auth');
|
|
0 commit comments