Skip to content

Commit 2554664

Browse files
ShradddhaShradddha
authored andcommitted
AC-12092:: Remove Deprecations- PhpUnit10 Unit Tests
1 parent 5db42fb commit 2554664

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

ReCaptchaPaypal/Test/Unit/Plugin/ReplayPayflowReCaptchaForPlaceOrderTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ public function testAfterGetConfigFor(array $mocks, bool $isResultNull, bool $is
9696
/**
9797
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
9898
*/
99-
public function afterGetConfigForDataProvider(): array
99+
public static function afterGetConfigForDataProvider(): array
100100
{
101101
return [
102102
[
103103
[
104104
'reCaptchaSession' => [
105-
['method' => 'isValid', 'expects' => $this->never()]
105+
['method' => 'isValid', 'expects' => self::never()]
106106
]
107107
],
108108
true,
@@ -114,7 +114,7 @@ public function afterGetConfigForDataProvider(): array
114114
['method' => 'isCaptchaEnabledFor', 'with' => 'paypal_payflowpro', 'willReturn' => false]
115115
],
116116
'reCaptchaSession' => [
117-
['method' => 'isValid', 'expects' => $this->never(),]
117+
['method' => 'isValid', 'expects' => self::never(),]
118118
]
119119
],
120120
false,
@@ -126,10 +126,10 @@ public function afterGetConfigForDataProvider(): array
126126
['method' => 'isCaptchaEnabledFor', 'with' => 'paypal_payflowpro', 'willReturn' => true]
127127
],
128128
'request' => [
129-
['method' => 'getBodyParams', 'expects' => $this->once(), 'willReturn' => []]
129+
['method' => 'getBodyParams', 'expects' => self::once(), 'willReturn' => []]
130130
],
131131
'reCaptchaSession' => [
132-
['method' => 'isValid', 'expects' => $this->never(),]
132+
['method' => 'isValid', 'expects' => self::never(),]
133133
]
134134
],
135135
false,
@@ -143,12 +143,12 @@ public function afterGetConfigForDataProvider(): array
143143
'request' => [
144144
[
145145
'method' => 'getBodyParams',
146-
'expects' => $this->once(),
146+
'expects' => self::once(),
147147
'willReturn' => ['cartId' => 1, 'paymentMethod' => ['method' => 'checkmo']]
148148
]
149149
],
150150
'reCaptchaSession' => [
151-
['method' => 'isValid', 'expects' => $this->never(), 'willReturn' => false]
151+
['method' => 'isValid', 'expects' => self::never(), 'willReturn' => false]
152152
]
153153
],
154154
false,
@@ -162,12 +162,12 @@ public function afterGetConfigForDataProvider(): array
162162
'request' => [
163163
[
164164
'method' => 'getBodyParams',
165-
'expects' => $this->once(),
165+
'expects' => self::once(),
166166
'willReturn' => ['cartId' => 1, 'paymentMethod' => ['method' => Config::METHOD_PAYFLOWPRO]]
167167
]
168168
],
169169
'reCaptchaSession' => [
170-
['method' => 'isValid', 'expects' => $this->once(), 'with' => 1, 'willReturn' => false]
170+
['method' => 'isValid', 'expects' => self::once(), 'with' => 1, 'willReturn' => false]
171171
]
172172
],
173173
false,
@@ -181,12 +181,12 @@ public function afterGetConfigForDataProvider(): array
181181
'request' => [
182182
[
183183
'method' => 'getBodyParams',
184-
'expects' => $this->once(),
184+
'expects' => self::once(),
185185
'willReturn' => ['cartId' => 1, 'paymentMethod' => ['method' => Config::METHOD_PAYFLOWPRO]]
186186
]
187187
],
188188
'reCaptchaSession' => [
189-
['method' => 'isValid', 'expects' => $this->once(), 'with' => 1, 'willReturn' => true]
189+
['method' => 'isValid', 'expects' => self::once(), 'with' => 1, 'willReturn' => true]
190190
]
191191
],
192192
false,
@@ -200,15 +200,15 @@ public function afterGetConfigForDataProvider(): array
200200
'request' => [
201201
[
202202
'method' => 'getBodyParams',
203-
'expects' => $this->once(),
203+
'expects' => self::once(),
204204
'willReturn' => [
205205
'cart_id' => 1,
206206
'payment_method' => ['method' => Config::METHOD_PAYFLOWPRO]
207207
]
208208
]
209209
],
210210
'reCaptchaSession' => [
211-
['method' => 'isValid', 'expects' => $this->once(), 'with' => 1, 'willReturn' => true]
211+
['method' => 'isValid', 'expects' => self::once(), 'with' => 1, 'willReturn' => true]
212212
]
213213
],
214214
false,
@@ -222,7 +222,7 @@ public function afterGetConfigForDataProvider(): array
222222
'request' => [
223223
[
224224
'method' => 'getBodyParams',
225-
'expects' => $this->once(),
225+
'expects' => self::once(),
226226
'willReturn' => [
227227
'cartId' => '17uc43rge98nc92',
228228
'paymentMethod' => ['method' => Config::METHOD_PAYFLOWPRO]
@@ -232,24 +232,24 @@ public function afterGetConfigForDataProvider(): array
232232
'quoteIdMaskFactory' => [
233233
[
234234
'method' => 'create',
235-
'expects' => $this->once(),
235+
'expects' => self::once(),
236236
'willReturnProperty' => 'quoteIdMask'
237237
]
238238
],
239239
'quoteIdMask' => [
240240
[
241241
'method' => 'load',
242-
'expects' => $this->once(),
242+
'expects' => self::once(),
243243
'willReturnSelf' => null
244244
],
245245
[
246246
'method' => 'getQuoteId',
247-
'expects' => $this->once(),
247+
'expects' => self::once(),
248248
'willReturn' => 2
249249
]
250250
],
251251
'reCaptchaSession' => [
252-
['method' => 'isValid', 'expects' => $this->once(), 'with' => 2, 'willReturn' => true]
252+
['method' => 'isValid', 'expects' => self::once(), 'with' => 2, 'willReturn' => true]
253253
]
254254
],
255255
false,

ReCaptchaWebapiGraphQl/Test/Unit/Plugin/GraphQlValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function setUp(): void
6060
);
6161
}
6262

63-
public function getPluginCases(): array
63+
public static function getPluginCases(): array
6464
{
6565
return [
6666
'not-mutation' => [false, true, false, false],

ReCaptchaWebapiGraphQl/Test/Unit/Plugin/ValidationOverriderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function setUp(): void
3535
$this->model = new ValidationOverrider($this->userContextMock);
3636
}
3737

38-
public function getUserContextData(): array
38+
public static function getUserContextData(): array
3939
{
4040
return [
4141
'customer' => [UserContextInterface::USER_TYPE_CUSTOMER, 1, true],

ReCaptchaWebapiRest/Test/Unit/Plugin/RestValidationPluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function setUp(): void
7171
);
7272
}
7373

74-
public function getPluginCases(): array
74+
public static function getPluginCases(): array
7575
{
7676
return [
7777
'unprotected-endpoint' => [false, false, false],

ReCaptchaWebapiRest/Test/Unit/Plugin/SoapValidationPluginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function setUp(): void
6464
);
6565
}
6666

67-
public function getPluginCases(): array
67+
public static function getPluginCases(): array
6868
{
6969
return [
7070
'not-protected' => [false, UserContextInterface::USER_TYPE_GUEST, null, false],

ReCaptchaWebapiRest/Test/Unit/Plugin/ValidationOverriderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function setUp(): void
3535
$this->model = new ValidationOverrider($this->userContextMock);
3636
}
3737

38-
public function getUserContextData(): array
38+
public static function getUserContextData(): array
3939
{
4040
return [
4141
'customer' => [UserContextInterface::USER_TYPE_CUSTOMER, 1, true],

0 commit comments

Comments
 (0)