13
13
use Magento \Customer \Model \AuthenticationInterface ;
14
14
use Magento \Customer \Model \Data \Customer ;
15
15
use Magento \Customer \Model \EmailNotificationInterface ;
16
- use Magento \Customer \Model \ResourceModel \Visitor \CollectionFactory ;
17
16
use Magento \Directory \Model \AllowedCountries ;
18
17
use Magento \Framework \Api \SearchCriteriaBuilder ;
19
18
use Magento \Framework \App \Area ;
20
19
use Magento \Framework \Exception \InputException ;
21
20
use Magento \Framework \Exception \InvalidEmailOrPasswordException ;
22
21
use Magento \Framework \Exception \NoSuchEntityException ;
23
- use Magento \Framework \Exception \State \InputMismatchException ;
24
22
use Magento \Framework \Intl \DateTimeFactory ;
25
23
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager as ObjectManagerHelper ;
26
24
use Magento \Store \Model \ScopeInterface ;
27
- use \Magento \Framework \Exception \LocalizedException ;
25
+ use Magento \Framework \Exception \LocalizedException ;
26
+ use Magento \Store \Model \Website ;
27
+ use Magento \Store \Model \Store ;
28
+ use Magento \Customer \Api \Data \AddressInterface ;
28
29
29
30
/**
30
31
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -353,7 +354,7 @@ public function testCreateAccountWithPasswordHashWithExistingCustomer()
353
354
}
354
355
355
356
/**
356
- * @expectedException InputMismatchException
357
+ * @expectedException \Magento\Framework\Exception\State\ InputMismatchException
357
358
*/
358
359
public function testCreateAccountWithPasswordHashWithCustomerWithoutStoreId ()
359
360
{
@@ -426,7 +427,7 @@ public function testCreateAccountWithPasswordHashWithCustomerWithoutStoreId()
426
427
}
427
428
428
429
/**
429
- * @expectedException LocalizedException
430
+ * @expectedException \Magento\Framework\Exception\ LocalizedException
430
431
*/
431
432
public function testCreateAccountWithPasswordHashWithLocalizedException ()
432
433
{
@@ -498,7 +499,7 @@ public function testCreateAccountWithPasswordHashWithLocalizedException()
498
499
}
499
500
500
501
/**
501
- * @expectedException LocalizedException
502
+ * @expectedException \Magento\Framework\Exception\ LocalizedException
502
503
*/
503
504
public function testCreateAccountWithPasswordHashWithAddressException ()
504
505
{
@@ -589,7 +590,7 @@ public function testCreateAccountWithPasswordHashWithAddressException()
589
590
}
590
591
591
592
/**
592
- * @expectedException LocalizedException
593
+ * @expectedException \Magento\Framework\Exception\ LocalizedException
593
594
*/
594
595
public function testCreateAccountWithPasswordHashWithNewCustomerAndLocalizedException ()
595
596
{
@@ -824,7 +825,7 @@ public function dataProviderCheckPasswordStrength()
824
825
* @param int $minPasswordLength
825
826
* @param int $minCharacterSetsNum
826
827
* @dataProvider dataProviderCheckPasswordStrength
827
- * @throws LocalizedException
828
+ * @throws \Magento\Framework\Exception\ LocalizedException
828
829
*/
829
830
public function testCreateAccountWithPasswordInputException (
830
831
$ testNumber ,
@@ -879,7 +880,7 @@ public function testCreateAccountWithPasswordInputException(
879
880
}
880
881
881
882
/**
882
- * @throws LocalizedException
883
+ * @throws \Magento\Framework\Exception\ LocalizedException
883
884
*/
884
885
public function testCreateAccountInputExceptionExtraLongPassword ()
885
886
{
@@ -1519,7 +1520,7 @@ protected function prepareEmailSend($email, $templateIdentifier, $sender, $store
1519
1520
}
1520
1521
1521
1522
/**
1522
- * @throws LocalizedException
1523
+ * @throws \Magento\Framework\Exception\ LocalizedException
1523
1524
*/
1524
1525
public function testInitiatePasswordResetEmailReminder ()
1525
1526
{
@@ -1544,7 +1545,7 @@ public function testInitiatePasswordResetEmailReminder()
1544
1545
}
1545
1546
1546
1547
/**
1547
- * @throws LocalizedException
1548
+ * @throws \Magento\Framework\Exception\ LocalizedException
1548
1549
*/
1549
1550
public function testInitiatePasswordResetEmailReset ()
1550
1551
{
@@ -1568,7 +1569,7 @@ public function testInitiatePasswordResetEmailReset()
1568
1569
}
1569
1570
1570
1571
/**
1571
- * @throws LocalizedException
1572
+ * @throws \Magento\Framework\Exception\ LocalizedException
1572
1573
*/
1573
1574
public function testInitiatePasswordResetNoTemplate ()
1574
1575
{
@@ -1610,7 +1611,7 @@ public function testValidateResetPasswordTokenBadResetPasswordLinkToken()
1610
1611
}
1611
1612
1612
1613
/**
1613
- * @expectedException InputMismatchException
1614
+ * @expectedException \Magento\Framework\Exception\State\ InputMismatchException
1614
1615
* @expectedExceptionMessage The password token is mismatched. Reset and try again.
1615
1616
*/
1616
1617
public function testValidateResetPasswordTokenTokenMismatch ()
@@ -1755,7 +1756,7 @@ private function reInitModel()
1755
1756
1756
1757
/**
1757
1758
* @return void
1758
- * @throws LocalizedException
1759
+ * @throws \Magento\Framework\Exception\ LocalizedException
1759
1760
* @throws InvalidEmailOrPasswordException
1760
1761
*
1761
1762
*/
@@ -1836,7 +1837,7 @@ public function testChangePassword()
1836
1837
}
1837
1838
1838
1839
/**
1839
- * @throws LocalizedException
1840
+ * @throws \Magento\Framework\Exception\ LocalizedException
1840
1841
*/
1841
1842
public function testResetPassword ()
1842
1843
{
@@ -1893,7 +1894,7 @@ function ($string) {
1893
1894
/**
1894
1895
* @return void
1895
1896
* @throws InvalidEmailOrPasswordException
1896
- * @throws LocalizedException
1897
+ * @throws \Magento\Framework\Exception\ LocalizedException
1897
1898
*/
1898
1899
public function testChangePasswordException ()
1899
1900
{
@@ -1918,7 +1919,7 @@ public function testChangePasswordException()
1918
1919
1919
1920
/**
1920
1921
* @return void
1921
- * @throws LocalizedException
1922
+ * @throws \Magento\Framework\Exception\ LocalizedException
1922
1923
*/
1923
1924
public function testAuthenticate ()
1924
1925
{
@@ -1982,7 +1983,7 @@ public function testAuthenticate()
1982
1983
* @param string|null $confirmation
1983
1984
* @param string $expected
1984
1985
* @dataProvider dataProviderGetConfirmationStatus
1985
- * @throws LocalizedException
1986
+ * @throws \Magento\Framework\Exception\ LocalizedException
1986
1987
*/
1987
1988
public function testGetConfirmationStatus (
1988
1989
$ isConfirmationRequired ,
@@ -2037,7 +2038,7 @@ public function dataProviderGetConfirmationStatus()
2037
2038
}
2038
2039
2039
2040
/**
2040
- * @expectedException LocalizedException
2041
+ * @expectedException \Magento\Framework\Exception\ LocalizedException
2041
2042
* @expectedExceptionMessage Exception message
2042
2043
*/
2043
2044
public function testCreateAccountWithPasswordHashForGuestException ()
@@ -2230,7 +2231,7 @@ private function prepareDateTimeFactory()
2230
2231
/**
2231
2232
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
2232
2233
* @return void
2233
- * @throws LocalizedException
2234
+ * @throws \Magento\Framework\Exception\ LocalizedException
2234
2235
*/
2235
2236
public function testCreateAccountUnexpectedValueException (): void
2236
2237
{
@@ -2354,9 +2355,8 @@ public function testCreateAccountUnexpectedValueException(): void
2354
2355
}
2355
2356
2356
2357
/**
2357
- * @throws InputException
2358
- * @throws InputMismatchException
2359
- * @throws LocalizedException
2358
+ * @throws \Magento\Framework\Exception\LocalizedException
2359
+ * @expectedException \Magento\Framework\Exception\LocalizedException
2360
2360
*/
2361
2361
public function testCreateAccountWithStoreNotInWebsite ()
2362
2362
{
@@ -2395,7 +2395,7 @@ public function testCreateAccountWithStoreNotInWebsite()
2395
2395
* Test for validating customer store id by customer website id.
2396
2396
*
2397
2397
* @return void
2398
- * @throws LocalizedException
2398
+ * @throws \Magento\Framework\Exception\ LocalizedException
2399
2399
*/
2400
2400
public function testValidateCustomerStoreIdByWebsiteId (): void
2401
2401
{
@@ -2418,7 +2418,7 @@ public function testValidateCustomerStoreIdByWebsiteId(): void
2418
2418
/**
2419
2419
* Test for validating customer store id by customer website id with Exception
2420
2420
*
2421
- * @expectedException LocalizedException
2421
+ * @expectedException \Magento\Framework\Exception\ LocalizedException
2422
2422
* @expectedExceptionMessage The store view is not in the associated website.
2423
2423
*/
2424
2424
public function testValidateCustomerStoreIdByWebsiteIdException (): void
0 commit comments