|
7 | 7 |
|
8 | 8 | namespace Magento\Customer\Model\AccountManagement; |
9 | 9 |
|
10 | | -use Magento\Catalog\Helper\Data; |
11 | 10 | use Magento\Customer\Api\AccountManagementInterface; |
12 | 11 | use Magento\Customer\Model\AccountManagement; |
13 | 12 | use Magento\Customer\Test\Fixture\Customer; |
14 | 13 | use Magento\Framework\Exception\LocalizedException; |
15 | 14 | use Magento\Framework\ObjectManagerInterface; |
16 | 15 | use Magento\Store\Model\StoreManagerInterface; |
17 | | -use Magento\Store\Test\Fixture\Group as StoreGroupFixture; |
18 | | -use Magento\Store\Test\Fixture\Store as StoreFixture; |
19 | | -use Magento\Store\Test\Fixture\Website as WebsiteFixture; |
20 | | -use Magento\TestFramework\Fixture\Config; |
21 | 16 | use Magento\TestFramework\Fixture\DataFixture; |
22 | 17 | use Magento\TestFramework\Fixture\DataFixtureStorage; |
23 | 18 | use Magento\TestFramework\Fixture\DataFixtureStorageManager; |
@@ -86,27 +81,13 @@ public function testForgotPassword(): void |
86 | 81 | * @throws LocalizedException |
87 | 82 | */ |
88 | 83 | #[ |
89 | | - Config(Data::XML_PATH_PRICE_SCOPE, Data::PRICE_SCOPE_WEBSITE), |
90 | | - DataFixture(WebsiteFixture::class, as: 'website2'), |
91 | | - DataFixture(StoreGroupFixture::class, ['website_id' => '$website2.id$'], 'store_group2'), |
92 | | - DataFixture(StoreFixture::class, ['store_group_id' => '$store_group2.id$'], 'store2'), |
93 | | - DataFixture(StoreFixture::class, ['store_group_id' => '$store_group2.id$'], 'store3'), |
94 | | - DataFixture( |
95 | | - Customer::class, |
96 | | - [ |
97 | | - 'store_id' => '$store2.id$', |
98 | | - 'website_id' => '1', |
99 | | - 'addresses' => [[]] |
100 | | - ], |
101 | | - as: 'customer' |
102 | | - ) |
| 84 | + DataFixture(Customer::class, ['email' => 'customer@search.example.com'], as: 'customer'), |
103 | 85 | ] |
104 | 86 | public function testResetPasswordFlowStorefront(): void |
105 | 87 | { |
106 | 88 | // Forgot password section; |
107 | 89 | $customer = $this->fixtures->get('customer'); |
108 | 90 | $email = $customer->getEmail(); |
109 | | - $customer->getId(); |
110 | 91 | $customerId = (int)$customer->getId(); |
111 | 92 | $result = $this->accountManagement->initiatePasswordReset($email, AccountManagement::EMAIL_RESET); |
112 | 93 | $message = $this->transportBuilder->getSentMessage(); |
|
0 commit comments