Skip to content

Commit 94f96c2

Browse files
committed
Merge remote-tracking branch 'origin/phpunit_deprecations' into Hammer-Plateform-Health-17July24
2 parents 841f900 + ff8d973 commit 94f96c2

File tree

7 files changed

+43
-28
lines changed

7 files changed

+43
-28
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerAddressTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ public function testCreateCustomerAddressRegionCodeWithOutRegionIdForNoRegionReq
807807
/**
808808
* @return array
809809
*/
810-
public function invalidInputDataProvider()
810+
public static function invalidInputDataProvider()
811811
{
812812
return [
813813
['', 'Syntax Error: Expected Name, found )'],

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testCreateCustomerAccountWithPassword(string $email)
7878
/**
7979
* @return array
8080
*/
81-
public function validEmailAddressDataProvider(): array
81+
public static function validEmailAddressDataProvider(): array
8282
{
8383
return [
8484
['new_customer@example.com'],
@@ -221,7 +221,7 @@ public function testCreateCustomerIfEmailIsNotValid(string $email)
221221
/**
222222
* @return array
223223
*/
224-
public function invalidEmailAddressDataProvider(): array
224+
public static function invalidEmailAddressDataProvider(): array
225225
{
226226
return [
227227
['plainaddress'],

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/CreateCustomerV2Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testCreateCustomerAccountWithPassword(string $email)
7979
/**
8080
* @return array
8181
*/
82-
public function validEmailAddressDataProvider(): array
82+
public static function validEmailAddressDataProvider(): array
8383
{
8484
return [
8585
['new_customer@example.com'],
@@ -222,7 +222,7 @@ public function testCreateCustomerIfEmailIsNotValid(string $email)
222222
/**
223223
* @return array
224224
*/
225-
public function invalidEmailAddressDataProvider(): array
225+
public static function invalidEmailAddressDataProvider(): array
226226
{
227227
return [
228228
['plainaddress'],

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/GenerateCustomerTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function testRegenerateCustomerToken(): void
116116
/**
117117
* @return array
118118
*/
119-
public function dataProviderInvalidCustomerInfo(): array
119+
public static function dataProviderInvalidCustomerInfo(): array
120120
{
121121
return [
122122
'invalid_email' => [

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerAddressTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public function testUpdateCustomerAddressWithInvalidInput(string $input, string
424424
/**
425425
* @return array
426426
*/
427-
public function invalidInputDataProvider()
427+
public static function invalidInputDataProvider()
428428
{
429429
return [
430430
['', '"input" value must be specified'],

dev/tests/api-functional/testsuite/Magento/GraphQl/CustomerGraphQl/Model/Resolver/CustomerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ public function testCustomerQueryingCustomerWithDifferentStoreHeaderDoesNotGener
618618
);
619619
}
620620

621-
public function invalidationMechanismProvider(): array
621+
public static function invalidationMechanismProvider(): array
622622
{
623623
// provider is invoked before setUp() is called so need to init here
624624
$repo = Bootstrap::getObjectManager()->get(

dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -200,31 +200,46 @@ public function testImportData(
200200
*
201201
* @return array
202202
*/
203-
public function importDataDataProvider()
203+
public static function importDataDataProvider()
204204
{
205205
$filesDirectory = __DIR__ . '/_files/';
206-
$sourceData = [
207-
'delete_behavior' => [
208-
'$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE,
209-
'$sourceFile' => $filesDirectory . self::DELETE_FILE_NAME,
210-
'$dataBefore' => $this->_beforeImport,
211-
'$dataAfter' => [],
212-
'$updatedItemsCount' => 0,
213-
'$createdItemsCount' => 0,
214-
'$deletedItemsCount' => 1,
215-
'$errors' => [],
206+
$beforeImport = [
207+
'betsyparker@example.com' => [
208+
'addresses' => ['19107', '72701'],
209+
'data' => ['firstname' => 'Betsy', 'lastname' => 'Parker'],
210+
],
211+
];
212+
$afterImport = [
213+
'betsyparker@example.com' => [
214+
'addresses' => ['19107', '72701', '19108'],
215+
'data' => ['firstname' => 'NotBetsy', 'lastname' => 'NotParker'],
216216
],
217+
'anthonyanealy@magento.com' => ['addresses' => ['72701', '92664']],
218+
'loribbanks@magento.com' => ['addresses' => ['98801']],
219+
'kellynilson@magento.com' => ['addresses' => []],
217220
];
218221

219-
$sourceData['add_update_behavior'] = [
220-
'$behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE,
221-
'$sourceFile' => $filesDirectory . self::UPDATE_FILE_NAME,
222-
'$dataBefore' => $this->_beforeImport,
223-
'$dataAfter' => $this->_afterImport,
224-
'$updatedItemsCount' => 1,
225-
'$createdItemsCount' => 3,
226-
'$deletedItemsCount' => 0,
227-
'$errors' => [],
222+
$sourceData = [
223+
'delete_behavior' => [
224+
'behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE,
225+
'sourceFile' => $filesDirectory . self::DELETE_FILE_NAME,
226+
'dataBefore' => $beforeImport,
227+
'dataAfter' => [],
228+
'updatedItemsCount' => 0,
229+
'createdItemsCount' => 0,
230+
'deletedItemsCount' => 1,
231+
'errors' => [],
232+
],
233+
'add_update_behavior' => [
234+
'behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE,
235+
'sourceFile' => $filesDirectory . self::UPDATE_FILE_NAME,
236+
'dataBefore' => $beforeImport,
237+
'dataAfter' => $afterImport,
238+
'updatedItemsCount' => 1,
239+
'createdItemsCount' => 3,
240+
'deletedItemsCount' => 0,
241+
'errors' => [],
242+
],
228243
];
229244

230245
return $sourceData;

0 commit comments

Comments
 (0)