Skip to content

Commit ac89ab4

Browse files
author
Mark Berube
committed
MC-40099: Changing groupId functionality on createAccount()
1 parent dceb003 commit ac89ab4

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@
1313
use Magento\Customer\Model\AuthenticationInterface;
1414
use Magento\Customer\Model\Data\Customer;
1515
use Magento\Customer\Model\EmailNotificationInterface;
16-
use Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory;
1716
use Magento\Directory\Model\AllowedCountries;
1817
use Magento\Framework\Api\SearchCriteriaBuilder;
1918
use Magento\Framework\App\Area;
2019
use Magento\Framework\Exception\InputException;
2120
use Magento\Framework\Exception\InvalidEmailOrPasswordException;
2221
use Magento\Framework\Exception\NoSuchEntityException;
23-
use Magento\Framework\Exception\State\InputMismatchException;
2422
use Magento\Framework\Intl\DateTimeFactory;
2523
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
2624
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;
2829

2930
/**
3031
* @SuppressWarnings(PHPMD.TooManyFields)
@@ -353,7 +354,7 @@ public function testCreateAccountWithPasswordHashWithExistingCustomer()
353354
}
354355

355356
/**
356-
* @expectedException InputMismatchException
357+
* @expectedException \Magento\Framework\Exception\State\InputMismatchException
357358
*/
358359
public function testCreateAccountWithPasswordHashWithCustomerWithoutStoreId()
359360
{
@@ -426,7 +427,7 @@ public function testCreateAccountWithPasswordHashWithCustomerWithoutStoreId()
426427
}
427428

428429
/**
429-
* @expectedException LocalizedException
430+
* @expectedException \Magento\Framework\Exception\LocalizedException
430431
*/
431432
public function testCreateAccountWithPasswordHashWithLocalizedException()
432433
{
@@ -498,7 +499,7 @@ public function testCreateAccountWithPasswordHashWithLocalizedException()
498499
}
499500

500501
/**
501-
* @expectedException LocalizedException
502+
* @expectedException \Magento\Framework\Exception\LocalizedException
502503
*/
503504
public function testCreateAccountWithPasswordHashWithAddressException()
504505
{
@@ -589,7 +590,7 @@ public function testCreateAccountWithPasswordHashWithAddressException()
589590
}
590591

591592
/**
592-
* @expectedException LocalizedException
593+
* @expectedException \Magento\Framework\Exception\LocalizedException
593594
*/
594595
public function testCreateAccountWithPasswordHashWithNewCustomerAndLocalizedException()
595596
{
@@ -824,7 +825,7 @@ public function dataProviderCheckPasswordStrength()
824825
* @param int $minPasswordLength
825826
* @param int $minCharacterSetsNum
826827
* @dataProvider dataProviderCheckPasswordStrength
827-
* @throws LocalizedException
828+
* @throws \Magento\Framework\Exception\LocalizedException
828829
*/
829830
public function testCreateAccountWithPasswordInputException(
830831
$testNumber,
@@ -879,7 +880,7 @@ public function testCreateAccountWithPasswordInputException(
879880
}
880881

881882
/**
882-
* @throws LocalizedException
883+
* @throws \Magento\Framework\Exception\LocalizedException
883884
*/
884885
public function testCreateAccountInputExceptionExtraLongPassword()
885886
{
@@ -1519,7 +1520,7 @@ protected function prepareEmailSend($email, $templateIdentifier, $sender, $store
15191520
}
15201521

15211522
/**
1522-
* @throws LocalizedException
1523+
* @throws \Magento\Framework\Exception\LocalizedException
15231524
*/
15241525
public function testInitiatePasswordResetEmailReminder()
15251526
{
@@ -1544,7 +1545,7 @@ public function testInitiatePasswordResetEmailReminder()
15441545
}
15451546

15461547
/**
1547-
* @throws LocalizedException
1548+
* @throws \Magento\Framework\Exception\LocalizedException
15481549
*/
15491550
public function testInitiatePasswordResetEmailReset()
15501551
{
@@ -1568,7 +1569,7 @@ public function testInitiatePasswordResetEmailReset()
15681569
}
15691570

15701571
/**
1571-
* @throws LocalizedException
1572+
* @throws \Magento\Framework\Exception\LocalizedException
15721573
*/
15731574
public function testInitiatePasswordResetNoTemplate()
15741575
{
@@ -1610,7 +1611,7 @@ public function testValidateResetPasswordTokenBadResetPasswordLinkToken()
16101611
}
16111612

16121613
/**
1613-
* @expectedException InputMismatchException
1614+
* @expectedException \Magento\Framework\Exception\State\InputMismatchException
16141615
* @expectedExceptionMessage The password token is mismatched. Reset and try again.
16151616
*/
16161617
public function testValidateResetPasswordTokenTokenMismatch()
@@ -1755,7 +1756,7 @@ private function reInitModel()
17551756

17561757
/**
17571758
* @return void
1758-
* @throws LocalizedException
1759+
* @throws \Magento\Framework\Exception\LocalizedException
17591760
* @throws InvalidEmailOrPasswordException
17601761
*
17611762
*/
@@ -1836,7 +1837,7 @@ public function testChangePassword()
18361837
}
18371838

18381839
/**
1839-
* @throws LocalizedException
1840+
* @throws \Magento\Framework\Exception\LocalizedException
18401841
*/
18411842
public function testResetPassword()
18421843
{
@@ -1893,7 +1894,7 @@ function ($string) {
18931894
/**
18941895
* @return void
18951896
* @throws InvalidEmailOrPasswordException
1896-
* @throws LocalizedException
1897+
* @throws \Magento\Framework\Exception\LocalizedException
18971898
*/
18981899
public function testChangePasswordException()
18991900
{
@@ -1918,7 +1919,7 @@ public function testChangePasswordException()
19181919

19191920
/**
19201921
* @return void
1921-
* @throws LocalizedException
1922+
* @throws \Magento\Framework\Exception\LocalizedException
19221923
*/
19231924
public function testAuthenticate()
19241925
{
@@ -1982,7 +1983,7 @@ public function testAuthenticate()
19821983
* @param string|null $confirmation
19831984
* @param string $expected
19841985
* @dataProvider dataProviderGetConfirmationStatus
1985-
* @throws LocalizedException
1986+
* @throws \Magento\Framework\Exception\LocalizedException
19861987
*/
19871988
public function testGetConfirmationStatus(
19881989
$isConfirmationRequired,
@@ -2037,7 +2038,7 @@ public function dataProviderGetConfirmationStatus()
20372038
}
20382039

20392040
/**
2040-
* @expectedException LocalizedException
2041+
* @expectedException \Magento\Framework\Exception\LocalizedException
20412042
* @expectedExceptionMessage Exception message
20422043
*/
20432044
public function testCreateAccountWithPasswordHashForGuestException()
@@ -2230,7 +2231,7 @@ private function prepareDateTimeFactory()
22302231
/**
22312232
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
22322233
* @return void
2233-
* @throws LocalizedException
2234+
* @throws \Magento\Framework\Exception\LocalizedException
22342235
*/
22352236
public function testCreateAccountUnexpectedValueException(): void
22362237
{
@@ -2354,9 +2355,8 @@ public function testCreateAccountUnexpectedValueException(): void
23542355
}
23552356

23562357
/**
2357-
* @throws InputException
2358-
* @throws InputMismatchException
2359-
* @throws LocalizedException
2358+
* @throws \Magento\Framework\Exception\LocalizedException
2359+
* @expectedException \Magento\Framework\Exception\LocalizedException
23602360
*/
23612361
public function testCreateAccountWithStoreNotInWebsite()
23622362
{
@@ -2395,7 +2395,7 @@ public function testCreateAccountWithStoreNotInWebsite()
23952395
* Test for validating customer store id by customer website id.
23962396
*
23972397
* @return void
2398-
* @throws LocalizedException
2398+
* @throws \Magento\Framework\Exception\LocalizedException
23992399
*/
24002400
public function testValidateCustomerStoreIdByWebsiteId(): void
24012401
{
@@ -2418,7 +2418,7 @@ public function testValidateCustomerStoreIdByWebsiteId(): void
24182418
/**
24192419
* Test for validating customer store id by customer website id with Exception
24202420
*
2421-
* @expectedException LocalizedException
2421+
* @expectedException \Magento\Framework\Exception\LocalizedException
24222422
* @expectedExceptionMessage The store view is not in the associated website.
24232423
*/
24242424
public function testValidateCustomerStoreIdByWebsiteIdException(): void

0 commit comments

Comments
 (0)