Skip to content

Commit 1518f8c

Browse files
committed
Fix broken test
1 parent 42a3eb7 commit 1518f8c

File tree

1 file changed

+3
-1
lines changed
  • dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml

1 file changed

+3
-1
lines changed

dev/tests/integration/testsuite/Magento/User/Controller/Adminhtml/AuthTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\User\Controller\Adminhtml;
77

8+
use Magento\Framework\Intl\DateTimeFactory;
89
use Magento\Framework\Stdlib\DateTime;
910
use Magento\TestFramework\Mail\Template\TransportBuilderMock;
1011
use Magento\TestFramework\Helper\Bootstrap;
@@ -128,7 +129,8 @@ public function testResetPasswordActionWithTokenNearExpiry()
128129
)->generateResetPasswordLinkToken();
129130
$user->changeResetPasswordLinkToken($resetPasswordToken);
130131

131-
$anHourAgo = Bootstrap::getObjectManager()->create(DateTime::class)
132+
$anHourAgo = Bootstrap::getObjectManager()->create(DateTimeFactory::class)
133+
->create()
132134
->sub(\DateInterval::createFromDateString('1 hour'))
133135
->format(DateTime::DATETIME_PHP_FORMAT);
134136
$user->setRpTokenCreatedAt($anHourAgo);

0 commit comments

Comments
 (0)