Skip to content

Commit cf4545c

Browse files
ShradddhaShradddha
authored andcommitted
AC-12092:: Remove Deprecations- PhpUnit10 Unit Tests
1 parent 8ba3c40 commit cf4545c

File tree

54 files changed

+82
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+82
-82
lines changed

app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/SelectTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function testOutputValue($value, $expected)
164164
/**
165165
* @return array
166166
*/
167-
public function outputValueDataProvider()
167+
public static function outputValueDataProvider()
168168
{
169169
return [
170170
'empty' => ['', ''],

app/code/Magento/Downloadable/Test/Unit/Model/Sales/Order/Link/PurchasedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testGetLink(
108108
/**
109109
* @return array[]
110110
*/
111-
public function getLinkDataProvider(): array
111+
public static function getLinkDataProvider(): array
112112
{
113113
return [
114114
[

app/code/Magento/Downloadable/Test/Unit/Model/Sample/ContentValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function testIsValidThrowsExceptionIfSortOrderIsInvalid($sortOrder)
109109
/**
110110
* @return array
111111
*/
112-
public function getInvalidSortOrder()
112+
public static function getInvalidSortOrder()
113113
{
114114
return [
115115
[-1],

app/code/Magento/Downloadable/Test/Unit/Observer/IsAllowedGuestCheckoutObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function testIsAllowedGuestCheckoutConfigSetToTrue($productType, $isAllow
182182
/**
183183
* @return array
184184
*/
185-
public function dataProviderForTestisAllowedGuestCheckoutConfigSetToTrue(): array
185+
public static function dataProviderForTestisAllowedGuestCheckoutConfigSetToTrue(): array
186186
{
187187
return [
188188
1 => [Type::TYPE_DOWNLOADABLE, true],

app/code/Magento/Downloadable/Test/Unit/Observer/SetHasDownloadableProductsObserverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function createOrderItem(
143143
*
144144
* @return array
145145
*/
146-
public function executeWithSessionNoDownloadableProductsDataProvider()
146+
public static function executeWithSessionNoDownloadableProductsDataProvider()
147147
{
148148
return [
149149
'Order has one item is downloadable product' => [
@@ -159,7 +159,7 @@ public function executeWithSessionNoDownloadableProductsDataProvider()
159159
'1'
160160
]
161161
],
162-
$this->once()
162+
self::once()
163163
],
164164
'Order has all items are simple product' => [
165165
[
@@ -174,7 +174,7 @@ public function executeWithSessionNoDownloadableProductsDataProvider()
174174
'0'
175175
]
176176
],
177-
$this->never()
177+
self::never()
178178
],
179179
];
180180
}

app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/LinksTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,32 +140,32 @@ public function testGetLinksTitle($id, $typeId, $expectedGetTitle, $expectedGetV
140140
/**
141141
* @return array
142142
*/
143-
public function getLinksTitleDataProvider()
143+
public static function getLinksTitleDataProvider()
144144
{
145145
return [
146146
[
147147
'id' => 1,
148148
'typeId' => Type::TYPE_DOWNLOADABLE,
149-
'expectedGetTitle' => $this->once(),
150-
'expectedGetValue' => $this->never(),
149+
'expectedGetTitle' => self::once(),
150+
'expectedGetValue' => self::never(),
151151
],
152152
[
153153
'id' => null,
154154
'typeId' => Type::TYPE_DOWNLOADABLE,
155-
'expectedGetTitle' => $this->never(),
156-
'expectedGetValue' => $this->once(),
155+
'expectedGetTitle' => self::never(),
156+
'expectedGetValue' => self::once(),
157157
],
158158
[
159159
'id' => 1,
160160
'typeId' => 'someType',
161-
'expectedGetTitle' => $this->never(),
162-
'expectedGetValue' => $this->once(),
161+
'expectedGetTitle' => self::never(),
162+
'expectedGetValue' => self::once(),
163163
],
164164
[
165165
'id' => null,
166166
'typeId' => 'someType',
167-
'expectedGetTitle' => $this->never(),
168-
'expectedGetValue' => $this->once(),
167+
'expectedGetTitle' => self::never(),
168+
'expectedGetValue' => self::once(),
169169
],
170170
];
171171
}

app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/Data/SamplesTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,32 +130,32 @@ public function testGetSamplesTitle($id, $typeId, $expectedGetTitle, $expectedGe
130130
/**
131131
* @return array
132132
*/
133-
public function getSamplesTitleDataProvider()
133+
public static function getSamplesTitleDataProvider()
134134
{
135135
return [
136136
[
137137
'id' => 1,
138138
'typeId' => Type::TYPE_DOWNLOADABLE,
139-
'expectedGetTitle' => $this->once(),
140-
'expectedGetValue' => $this->never(),
139+
'expectedGetTitle' => self::once(),
140+
'expectedGetValue' => self::never(),
141141
],
142142
[
143143
'id' => null,
144144
'typeId' => Type::TYPE_DOWNLOADABLE,
145-
'expectedGetTitle' => $this->never(),
146-
'expectedGetValue' => $this->once(),
145+
'expectedGetTitle' => self::never(),
146+
'expectedGetValue' => self::once(),
147147
],
148148
[
149149
'id' => 1,
150150
'typeId' => 'someType',
151-
'expectedGetTitle' => $this->never(),
152-
'expectedGetValue' => $this->once(),
151+
'expectedGetTitle' => self::never(),
152+
'expectedGetValue' => self::once(),
153153
],
154154
[
155155
'id' => null,
156156
'typeId' => 'someType',
157-
'expectedGetTitle' => $this->never(),
158-
'expectedGetValue' => $this->once(),
157+
'expectedGetTitle' => self::never(),
158+
'expectedGetValue' => self::once(),
159159
],
160160
];
161161
}

app/code/Magento/Downloadable/Test/Unit/Ui/DataProvider/Product/Form/Modifier/DownloadablePanelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testModifyData($typeId, $isDownloadable)
9595
/**
9696
* @return array
9797
*/
98-
public function modifyDataDataProvider()
98+
public static function modifyDataDataProvider()
9999
{
100100
return [
101101
['typeId' => Type::TYPE_DOWNLOADABLE, 'isDownloadable' => '1'],

app/code/Magento/DownloadableImportExport/Test/Unit/Helper/DataTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testIsRowDownloadableEmptyOptions($rowData, $expected)
4646
*
4747
* @return array
4848
*/
49-
public function isRowDownloadableEmptyOptionsDataProvider()
49+
public static function isRowDownloadableEmptyOptionsDataProvider()
5050
{
5151
return [
5252
'Data set include downloadable link and sample' => [
@@ -122,7 +122,7 @@ public function testFillExistOptions($base, $option, $existingOptions, $expected
122122
*
123123
* @return array
124124
*/
125-
public function fillExistOptionsDataProvider()
125+
public static function fillExistOptionsDataProvider()
126126
{
127127
return [
128128
'Data set 1' => [
@@ -201,7 +201,7 @@ public function testPrepareDataForSave($base, $replacement, $expected)
201201
*
202202
* @return array
203203
*/
204-
public function prepareDataForSaveDataProvider()
204+
public static function prepareDataForSaveDataProvider()
205205
{
206206
return [
207207
'Data set 1' => [
@@ -263,7 +263,7 @@ public function testGetTypeByValue($option, $expected)
263263
*
264264
* @return array
265265
*/
266-
public function getTypeByValueDataProvider()
266+
public static function getTypeByValueDataProvider()
267267
{
268268
return [
269269
'Case File Option Value' => [

app/code/Magento/DownloadableImportExport/Test/Unit/Model/Import/Product/Type/DownloadableTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public function testSaveDataAppend($newSku, $bunch, $allowImport, $fetchResult):
270270
* @return array
271271
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
272272
*/
273-
public function dataForSave(): array
273+
public static function dataForSave(): array
274274
{
275275
return [
276276
[
@@ -587,7 +587,7 @@ public function testIsRowValid(array $rowData, $rowNum, $isNewProduct, $isDomain
587587
* @return array
588588
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
589589
*/
590-
public function isRowValidData(): array
590+
public static function isRowValidData(): array
591591
{
592592
return [
593593
[
@@ -763,7 +763,7 @@ public function testSetUploaderDirFalse($newSku, $bunch, $allowImport, $parsedOp
763763
*
764764
* @return array
765765
*/
766-
public function dataForUploaderDir(): array
766+
public static function dataForUploaderDir(): array
767767
{
768768
return [
769769
[

0 commit comments

Comments
 (0)