Skip to content

Commit b913c85

Browse files
AC-12092_PHPUnit10: Providing invalid named argument is deprecated and will not be supported in PHPUnit 11.0
1 parent f8d5abd commit b913c85

File tree

21 files changed

+578
-570
lines changed

21 files changed

+578
-570
lines changed

app/code/Magento/ConfigurableProduct/Test/Unit/Model/Product/Type/VariationMatrixTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public function testGetVariations($expectedResult)
4545
public static function variationProvider()
4646
{
4747
return [
48-
[
49-
'with_attribute_id' => [
48+
'with_attribute_id' => [
49+
'expectedResult' => [
5050
'result' => [
5151
[
5252
130 => [
@@ -101,8 +101,10 @@ public static function variationProvider()
101101
],
102102
],
103103
]
104-
],
105-
'without_attribute_id' => [
104+
]
105+
],
106+
'without_attribute_id' => [
107+
'expectedResult' => [
106108
'result' => [
107109
[
108110
130 => [

app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ public function testGetAccountLock($expectedResult, $value)
270270
public static function getAccountLockDataProvider()
271271
{
272272
return [
273-
['result' => 'Locked', 'expectedValue' => true],
274-
['result' => 'Unlocked', 'expectedValue' => false]
273+
['expectedResult' => 'Locked', 'value' => true],
274+
['expectedResult' => 'Unlocked', 'value' => false]
275275
];
276276
}
277277
}

app/code/Magento/Customer/Test/Unit/Controller/Plugin/AccountTest.php

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,33 +128,28 @@ public static function beforeExecuteDataProvider()
128128
return [
129129
[
130130
'action' => 'TestAction',
131-
'allowed_actions' => ['TestAction'],
132-
'is_action_allowed' => true,
133-
'is_authenticated' => false,
131+
'allowedActions' => ['TestAction'],
132+
'isAllowed' => true
134133
],
135134
[
136135
'action' => 'testaction',
137-
'allowed_actions' => ['testaction'],
138-
'is_action_allowed' => true,
139-
'is_authenticated' => false,
136+
'allowedActions' => ['testaction'],
137+
'isAllowed' => true
140138
],
141139
[
142140
'action' => 'wrongaction',
143-
'allowed_actions' => ['testaction'],
144-
'is_action_allowed' => false,
145-
'is_authenticated' => false,
141+
'allowedActions' => ['testaction'],
142+
'isAllowed' => false
146143
],
147144
[
148145
'action' => 'wrongaction',
149-
'allowed_actions' => ['testaction'],
150-
'is_action_allowed' => false,
151-
'is_authenticated' => true,
146+
'allowedActions' => ['testaction'],
147+
'isAllowed' => false
152148
],
153149
[
154150
'action' => 'wrongaction',
155-
'allowed_actions' => [],
156-
'is_action_allowed' => false,
157-
'is_authenticated' => true,
151+
'allowedActions' => [],
152+
'isAllowed' => false
158153
],
159154
];
160155
}

app/code/Magento/Customer/Test/Unit/Model/Account/RedirectTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,18 +296,18 @@ public static function getRedirectDataProvider()
296296
[1, 2, 'referer', 'base', 'defined', '', 'account', 'login', 'logout', 'dashboard', true, true],
297297
// Logout, Without Redirect to Dashboard
298298
[
299-
'customer_id' => 1,
300-
'last_customer_id' => 2,
299+
'customerId' => 1,
300+
'lastCustomerId' => 2,
301301
'referer' => 'http://base.com/customer/account/logoutSuccess/',
302-
'base_url' => 'http://base.com/',
303-
'before_auth_url' => 'http://base.com/',
304-
'after_auth_url' => 'http://base.com/customer/account/',
305-
'account_url' => 'account',
306-
'login_url' => 'login',
307-
'logout_url' => 'logout',
308-
'dashboard_url' => 'dashboard',
309-
'is_customer_logged_id_flag' => true,
310-
'redirect_to_dashboard_flag' => false,
302+
'baseUrl' => 'http://base.com/',
303+
'beforeAuthUrl' => 'http://base.com/',
304+
'afterAuthUrl' => 'http://base.com/customer/account/',
305+
'accountUrl' => 'account',
306+
'loginUrl' => 'login',
307+
'logoutUrl' => 'logout',
308+
'dashboardUrl' => 'dashboard',
309+
'customerLoggedIn' => true,
310+
'redirectToDashboard' => false,
311311
],
312312
];
313313
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ public function testIsCustomerLocked($lockExpires, $expectedResult)
290290
public static function isCustomerLockedDataProvider()
291291
{
292292
return [
293-
['lockExpirationDate' => date("F j, Y", strtotime('-1 days')), 'expectedResult' => false],
294-
['lockExpirationDate' => date("F j, Y", strtotime('+1 days')), 'expectedResult' => true]
293+
['lockExpires' => date("F j, Y", strtotime('-1 days')), 'expectedResult' => false],
294+
['lockExpires' => date("F j, Y", strtotime('+1 days')), 'expectedResult' => true]
295295
];
296296
}
297297

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -354,46 +354,46 @@ public static function sendNotificationEmailsDataProvider(): array
354354
{
355355
return [
356356
[
357-
'test_number' => 1,
357+
'testNumber' => 1,
358358
'customerStoreId' => 0,
359-
'old_email' => '[email protected]',
360-
'new_email' => '[email protected]',
361-
'is_password_changed' => true
359+
'oldEmail' => '[email protected]',
360+
'newEmail' => '[email protected]',
361+
'isPasswordChanged' => true
362362
],
363363
[
364-
'test_number' => 1,
364+
'testNumber' => 1,
365365
'customerStoreId' => 2,
366-
'old_email' => '[email protected]',
367-
'new_email' => '[email protected]',
368-
'is_password_changed' => true
366+
'oldEmail' => '[email protected]',
367+
'newEmail' => '[email protected]',
368+
'isPasswordChanged' => true
369369
],
370370
[
371-
'test_number' => 2,
371+
'testNumber' => 2,
372372
'customerStoreId' => 0,
373-
'old_email' => '[email protected]',
374-
'new_email' => '[email protected]',
375-
'is_password_changed' => false
373+
'oldEmail' => '[email protected]',
374+
'newEmail' => '[email protected]',
375+
'isPasswordChanged' => false
376376
],
377377
[
378-
'test_number' => 2,
378+
'testNumber' => 2,
379379
'customerStoreId' => 2,
380-
'old_email' => '[email protected]',
381-
'new_email' => '[email protected]',
382-
'is_password_changed' => false
380+
'oldEmail' => '[email protected]',
381+
'newEmail' => '[email protected]',
382+
'isPasswordChanged' => false
383383
],
384384
[
385-
'test_number' => 3,
385+
'testNumber' => 3,
386386
'customerStoreId' => 0,
387-
'old_email' => '[email protected]',
388-
'new_email' => '[email protected]',
389-
'is_password_changed' => true
387+
'oldEmail' => '[email protected]',
388+
'newEmail' => '[email protected]',
389+
'isPasswordChanged' => true
390390
],
391391
[
392-
'test_number' => 3,
392+
'testNumber' => 3,
393393
'customerStoreId' => 2,
394-
'old_email' => '[email protected]',
395-
'new_email' => '[email protected]',
396-
'is_password_changed' => true
394+
'oldEmail' => '[email protected]',
395+
'newEmail' => '[email protected]',
396+
'isPasswordChanged' => true
397397
]
398398
];
399399
}

app/code/Magento/Customer/Test/Unit/Model/Validator/NameTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,25 @@ public static function expectedPunctuationInNamesDataProvider(): array
7373
[
7474
'firstName' => 'John',
7575
'middleName' => '',
76-
'lastNameName' => 'O’Doe',
76+
'lastName' => 'O’Doe',
7777
'message' => 'Inclined apostrophe must be allowed in names (iOS Smart Punctuation compatibility)'
7878
],
7979
[
8080
'firstName' => 'John',
8181
'middleName' => '',
82-
'lastNameName' => 'O\'Doe',
82+
'lastName' => 'O\'Doe',
8383
'message' => 'Legacy straight apostrophe must be allowed in names'
8484
],
8585
[
8686
'firstName' => 'John',
8787
'middleName' => '',
88-
'lastNameName' => 'O`Doe',
88+
'lastName' => 'O`Doe',
8989
'message' => 'Grave accent back quote character must be allowed in names'
9090
],
9191
[
9292
'firstName' => 'John & Smith',
9393
'middleName' => '',
94-
'lastNameName' => 'O`Doe',
94+
'lastName' => 'O`Doe',
9595
'message' => 'Special character ampersand(&) must be allowed in names'
9696
]
9797
];

app/code/Magento/Customer/Test/Unit/Observer/AfterAddressSaveObserverTest.php

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -599,69 +599,69 @@ public static function dataProviderAfterAddressSaveNewGroup()
599599
{
600600
return [
601601
[
602-
'vat_id' => 1,
603-
'vat_class' => null,
604-
'country_id' => 1,
605-
'country_code' => 'US',
606-
'group_id' => 1,
607-
'area_code' => Area::AREA_ADMINHTML,
608-
'is_vat_valid' => false,
609-
'request_sucess' => false,
610-
'valid_message' => '',
611-
'invalid_message' => '',
612-
'error_message' => '',
602+
'vatId' => 1,
603+
'vatClass' => null,
604+
'countryId' => 1,
605+
'country' => 'US',
606+
'newGroupId' => 1,
607+
'areaCode' => Area::AREA_ADMINHTML,
608+
'resultVatIsValid' => false,
609+
'resultRequestSuccess' => false,
610+
'resultValidMessage' => '',
611+
'resultInvalidMessage' => '',
612+
'resultErrorMessage' => '',
613613
],
614614
[
615-
'vat_id' => 1,
616-
'vat_class' => Vat::VAT_CLASS_DOMESTIC,
617-
'country_id' => 1,
618-
'country_code' => 'US',
619-
'group_id' => 1,
620-
'area_code' => Area::AREA_FRONTEND,
621-
'is_vat_valid' => true,
622-
'request_sucess' => false,
623-
'valid_message' => 'Your VAT ID was successfully validated. You will be charged tax.',
624-
'invalid_message' => '',
625-
'error_message' => '',
615+
'vatId' => 1,
616+
'vatClass' => Vat::VAT_CLASS_DOMESTIC,
617+
'countryId' => 1,
618+
'country' => 'US',
619+
'newGroupId' => 1,
620+
'areaCode' => Area::AREA_FRONTEND,
621+
'resultVatIsValid' => true,
622+
'resultRequestSuccess' => false,
623+
'resultValidMessage' => 'Your VAT ID was successfully validated. You will be charged tax.',
624+
'resultInvalidMessage' => '',
625+
'resultErrorMessage' => '',
626626
],
627627
[
628-
'vat_id' => 1,
629-
'vat_class' => Vat::VAT_CLASS_INTRA_UNION,
630-
'country_id' => 1,
631-
'country_code' => 'US',
632-
'group_id' => 1,
633-
'area_code' => Area::AREA_FRONTEND,
634-
'is_vat_valid' => true,
635-
'request_sucess' => false,
636-
'valid_message' => 'Your VAT ID was successfully validated. You will not be charged tax.',
637-
'invalid_message' => '',
638-
'error_message' => '',
628+
'vatId' => 1,
629+
'vatClass' => Vat::VAT_CLASS_INTRA_UNION,
630+
'countryId' => 1,
631+
'country' => 'US',
632+
'newGroupId' => 1,
633+
'areaCode' => Area::AREA_FRONTEND,
634+
'resultVatIsValid' => true,
635+
'resultRequestSuccess' => false,
636+
'resultValidMessage' => 'Your VAT ID was successfully validated. You will not be charged tax.',
637+
'resultInvalidMessage' => '',
638+
'resultErrorMessage' => '',
639639
],
640640
[
641-
'vat_id' => 1,
642-
'vat_class' => Vat::VAT_CLASS_INTRA_UNION,
643-
'country_id' => 1,
644-
'country_code' => 'US',
645-
'group_id' => 1,
646-
'area_code' => Area::AREA_FRONTEND,
647-
'is_vat_valid' => false,
648-
'request_sucess' => true,
649-
'valid_message' => '',
650-
'invalid_message' => 'The VAT ID entered (1) is not a valid VAT ID. You will be charged tax.',
651-
'error_message' => '',
641+
'vatId' => 1,
642+
'vatClass' => Vat::VAT_CLASS_INTRA_UNION,
643+
'countryId' => 1,
644+
'country' => 'US',
645+
'newGroupId' => 1,
646+
'areaCode' => Area::AREA_FRONTEND,
647+
'resultVatIsValid' => false,
648+
'resultRequestSuccess' => true,
649+
'resultValidMessage' => '',
650+
'resultInvalidMessage' => 'The VAT ID entered (1) is not a valid VAT ID. You will be charged tax.',
651+
'resultErrorMessage' => '',
652652
],
653653
[
654-
'vat_id' => 1,
655-
'vat_class' => Vat::VAT_CLASS_INTRA_UNION,
656-
'country_id' => 1,
657-
'country_code' => 'US',
658-
'group_id' => 1,
659-
'area_code' => Area::AREA_FRONTEND,
660-
'is_vat_valid' => false,
661-
'request_sucess' => false,
662-
'valid_message' => '',
663-
'invalid_message' => '',
664-
'error_message' => 'Your Tax ID cannot be validated. You will be charged tax. '
654+
'vatId' => 1,
655+
'vatClass' => Vat::VAT_CLASS_INTRA_UNION,
656+
'countryId' => 1,
657+
'country' => 'US',
658+
'newGroupId' => 1,
659+
'areaCode' => Area::AREA_FRONTEND,
660+
'resultVatIsValid' => false,
661+
'resultRequestSuccess' => false,
662+
'resultValidMessage' => '',
663+
'resultInvalidMessage' => '',
664+
'resultErrorMessage' => 'Your Tax ID cannot be validated. You will be charged tax. '
665665
. 'If you believe this is an error, please contact us at [email protected]',
666666
],
667667
];

app/code/Magento/Customer/Test/Unit/Observer/BeforeAddressSaveObserverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ public static function dataProviderBeforeAddressSaveWithoutCustomerAddressId()
162162
{
163163
return [
164164
[
165-
'TaxCalculationAddressType' => AbstractAddress::TYPE_BILLING,
165+
'configAddressType' => AbstractAddress::TYPE_BILLING,
166166
'isDefaultBilling' => true,
167167
'isDefaultShipping' => false,
168168
],
169169
[
170-
'TaxCalculationAddressType' => AbstractAddress::TYPE_SHIPPING,
170+
'configAddressType' => AbstractAddress::TYPE_SHIPPING,
171171
'isDefaultBilling' => false,
172172
'isDefaultShipping' => true,
173173
],

0 commit comments

Comments
 (0)