File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
src/Magento/FunctionalTestingFramework/DataTransport/Auth/Tfa Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright 2025 Adobe
4+ * All Rights Reserved.
5+ *
6+ * NOTICE: All information contained herein is, and remains
7+ * the property of Adobe and its suppliers, if any. The intellectual
8+ * and technical concepts contained herein are proprietary to Adobe
9+ * and its suppliers and are protected by all applicable intellectual
10+ * property laws, including trade secret and copyright laws.
11+ * Dissemination of this information or reproduction of this material
12+ * is strictly forbidden unless prior written permission is obtained
13+ * from Adobe.
14+ */
15+ declare (strict_types=1 );
16+
17+ namespace Magento \FunctionalTestingFramework \DataTransport \Auth \Tfa ;
18+
19+ use DateTimeImmutable ;
20+ use Psr \Clock \ClockInterface ;
21+
22+ class Clock implements ClockInterface
23+ {
24+ /**
25+ * Return DateTimeImmutable class object
26+ *
27+ * @return DateTimeImmutable
28+ */
29+ public function now (): DateTimeImmutable
30+ {
31+ return new DateTimeImmutable ();
32+ }
33+ }
Original file line number Diff line number Diff line change 99use Magento \FunctionalTestingFramework \Exceptions \TestFrameworkException ;
1010use OTPHP \TOTP ;
1111use Magento \FunctionalTestingFramework \DataGenerator \Handlers \CredentialStore ;
12- use DateTimeImmutable ;
1312
1413/**
1514 * Class OTP
@@ -64,7 +63,7 @@ private static function create($path)
6463 TOTP ::DEFAULT_DIGEST ,
6564 TOTP ::DEFAULT_DIGITS ,
6665 TOTP ::DEFAULT_EPOCH ,
67- new DateTimeImmutable ()
66+ new Clock ()
6867 );
6968 self ::$ totps [$ path ]->setIssuer ('MFTF ' );
7069 self ::$ totps [$ path ]->setLabel ('MFTF Testing ' );
You can’t perform that action at this time.
0 commit comments