File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
dev/tests/integration/testsuite/Magento/Customer/Model/ForgotPasswordToken Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \Customer \Model \ForgotPasswordToken ;
9
+
10
+ use Magento \Framework \Exception \NoSuchEntityException ;
11
+ use Magento \Framework \ObjectManagerInterface ;
12
+ use Magento \TestFramework \Helper \Bootstrap ;
13
+ use PHPUnit \Framework \TestCase ;
14
+
15
+ class GetCustomerByTokenTest extends TestCase
16
+ {
17
+ private const RESET_PASSWORD = '8ed8677e6c79e68b94e61658bd756ea5 ' ;
18
+
19
+ /** @var ObjectManagerInterface */
20
+ private $ objectManager ;
21
+
22
+ /**
23
+ * @var GetCustomerByToken
24
+ */
25
+ private $ customerByToken ;
26
+
27
+ protected function setUp ()
28
+ {
29
+ $ this ->objectManager = Bootstrap::getObjectManager ();
30
+ $ this ->customerByToken = $ this ->objectManager ->get (GetCustomerByToken::class);
31
+ }
32
+
33
+ /**
34
+ * @magentoDataFixture Magento/Customer/_files/customer.php
35
+ */
36
+ public function testExecuteWithNoSuchEntityException (): void
37
+ {
38
+ $ this ->expectExceptionMessage ('No such entity with rp_token = ' . self ::RESET_PASSWORD );
39
+ $ this ->customerByToken ->execute (self ::RESET_PASSWORD );
40
+ }
41
+ }
You can’t perform that action at this time.
0 commit comments