Skip to content

Commit 27c2086

Browse files
ShradddhaShradddha
authored andcommitted
AC-12092:: Remove Deprecations- PhpUnit10 Unit Tests
1 parent e81f28e commit 27c2086

File tree

73 files changed

+147
-147
lines changed

Some content is hidden

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

73 files changed

+147
-147
lines changed

app/code/Magento/AsynchronousOperations/Test/Unit/Model/ResourceModel/System/Message/Collection/Synchronized/PluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function testAfterToWithMessageLimit()
221221
/**
222222
* @return array
223223
*/
224-
public function afterToDataProvider()
224+
public static function afterToDataProvider()
225225
{
226226
return [
227227
[

app/code/Magento/Config/Test/Unit/Console/Command/ConfigSet/ProcessorFacadeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function testProcessWithValidatorException(LocalizedException $exception)
160160
/**
161161
* @return array
162162
*/
163-
public function processWithValidatorExceptionDataProvider()
163+
public static function processWithValidatorExceptionDataProvider()
164164
{
165165
return [
166166
[new LocalizedException(__('Some error'))],

app/code/Magento/Config/Test/Unit/Model/Config/Export/CommentTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testGet(
104104
/**
105105
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
106106
*/
107-
public function dataProviderForTestGet()
107+
public static function dataProviderForTestGet()
108108
{
109109
return [
110110
[
@@ -113,13 +113,13 @@ public function dataProviderForTestGet()
113113
'expectedMocks' => [
114114
'typePoolMock' => [
115115
'isPresent' => [
116-
'expects' => $this->never(),
116+
'expects' => self::never(),
117117
'returnMap' => [],
118118
]
119119
],
120120
'placeholderMock' => [
121121
'generate' => [
122-
'expects' => $this->never(),
122+
'expects' => self::never(),
123123
'returnMap' => [],
124124
],
125125
],
@@ -135,7 +135,7 @@ public function dataProviderForTestGet()
135135
'expectedMocks' => [
136136
'typePoolMock' => [
137137
'isPresent' => [
138-
'expects' => $this->exactly(2),
138+
'expects' => self::exactly(2),
139139
'returnMap' => [
140140
['some/notSensitive/field1', TypePool::TYPE_SENSITIVE, false],
141141
['some/notSensitive/field2', TypePool::TYPE_SENSITIVE, false],
@@ -144,7 +144,7 @@ public function dataProviderForTestGet()
144144
],
145145
'placeholderMock' => [
146146
'generate' => [
147-
'expects' => $this->never(),
147+
'expects' => self::never(),
148148
'returnMap' => [],
149149
],
150150
],
@@ -157,7 +157,7 @@ public function dataProviderForTestGet()
157157
'expectedMocks' => [
158158
'typePoolMock' => [
159159
'isPresent' => [
160-
'expects' => $this->exactly(5),
160+
'expects' => self::exactly(5),
161161
'returnMap' => [
162162
['some/sensitive/field1', TypePool::TYPE_SENSITIVE, true],
163163
['some/sensitive/field2', TypePool::TYPE_SENSITIVE, true],
@@ -168,7 +168,7 @@ public function dataProviderForTestGet()
168168
],
169169
'placeholderMock' => [
170170
'generate' => [
171-
'expects' => $this->exactly(3),
171+
'expects' => self::exactly(3),
172172
'returnMap' => [
173173
[
174174
'some/sensitive/field1',

app/code/Magento/Config/Test/Unit/Model/Config/Export/TypePoolTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testIsPresent(
5353
/**
5454
* @return array
5555
*/
56-
public function dataProviderToTestIsPresent()
56+
public static function dataProviderToTestIsPresent()
5757
{
5858
return [
5959
[
@@ -86,7 +86,7 @@ public function dataProviderToTestIsPresent()
8686
'field' => 'some/wrong/field',
8787
'typeList' => TypePool::TYPE_SENSITIVE,
8888
'excludeListCallback' => function (MockObject $mockObject) {
89-
$mockObject->expects($this->once())
89+
$mockObject->expects(self::once())
9090
->method('isPresent')
9191
->willReturn(false);
9292
},
@@ -106,7 +106,7 @@ public function dataProviderToTestIsPresent()
106106
'field' => 'some/environment/field1',
107107
'typeList' => TypePool::TYPE_SENSITIVE,
108108
'excludeListCallback' => function (MockObject $mockObject) {
109-
$mockObject->expects($this->once())
109+
$mockObject->expects(self::once())
110110
->method('isPresent')
111111
->willReturn(false);
112112
},
@@ -118,7 +118,7 @@ public function dataProviderToTestIsPresent()
118118
'field' => 'some/sensitive-environment/field1',
119119
'typeList' => TypePool::TYPE_SENSITIVE,
120120
'excludeListCallback' => function (MockObject $mockObject) {
121-
$mockObject->expects($this->never())
121+
$mockObject->expects(self::never())
122122
->method('isPresent');
123123
},
124124
'expectedResult' => true,

app/code/Magento/Config/Test/Unit/Model/Config/Reader/Source/Deployed/SettingCheckerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function testIsReadonly(
126126
/**
127127
* @return array
128128
*/
129-
public function isReadonlyDataProvider()
129+
public static function isReadonlyDataProvider()
130130
{
131131
return [
132132
[

app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function testIsVisibleReturnsTrueForProperScopes($settings, $scope)
152152
/**
153153
* @return array
154154
*/
155-
public function isVisibleReturnsTrueForProperScopesDataProvider()
155+
public static function isVisibleReturnsTrueForProperScopesDataProvider()
156156
{
157157
return [
158158
[
@@ -184,7 +184,7 @@ public function testIsVisibleReturnsFalseForNonProperScopes($settings, $scope)
184184
/**
185185
* @return array
186186
*/
187-
public function isVisibleReturnsFalseForNonProperScopesDataProvider()
187+
public static function isVisibleReturnsFalseForNonProperScopesDataProvider()
188188
{
189189
return [
190190
[

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ConcealInProductionConfigListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testIsDisabled($path, $mageMode, $expectedResult)
6868
*
6969
* @deprecated
7070
*/
71-
public function disabledDataProvider()
71+
public static function disabledDataProvider()
7272
{
7373
return [
7474
['first/path', State::MODE_PRODUCTION, true],
@@ -107,7 +107,7 @@ public function testIsHidden($path, $mageMode, $expectedResult)
107107
*
108108
* @deprecated
109109
*/
110-
public function hiddenDataProvider()
110+
public static function hiddenDataProvider()
111111
{
112112
return [
113113
['first/path', State::MODE_PRODUCTION, false],

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibility/ConcealInProductionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testCheckVisibility(string $path, string $mageMode, bool $isHidd
7171
/**
7272
* @return array
7373
*/
74-
public function disabledDataProvider(): array
74+
public static function disabledDataProvider(): array
7575
{
7676
return [
7777
//visibility of field 'section1/group1/field1' should be applied

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibility/ConcealInProductionWithoutScdOnDemandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testIsDisabledScdOnDemandDisabled(bool $isDisabled): void
140140
/**
141141
* @return array
142142
*/
143-
public function visibilityDataProvider(): array
143+
public static function visibilityDataProvider(): array
144144
{
145145
return [
146146
[true],

app/code/Magento/Config/Test/Unit/Model/Config/Structure/ElementVisibilityCompositeTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ public function testHidden($firstExpects, $firstResult, $secondExpects, $secondR
107107
/**
108108
* @return array
109109
*/
110-
public function visibilityDataProvider()
110+
public static function visibilityDataProvider()
111111
{
112112
return [
113-
[$this->once(), false, $this->once(), false, false],
114-
[$this->once(), false, $this->once(), true, true],
115-
[$this->once(), true, $this->never(), true, true],
116-
[$this->once(), true, $this->never(), false, true],
113+
[self::once(), false, self::once(), false, false],
114+
[self::once(), false, self::once(), true, true],
115+
[self::once(), true, self::never(), true, true],
116+
[self::once(), true, self::never(), false, true],
117117
];
118118
}
119119
}

0 commit comments

Comments
 (0)