Skip to content

Commit 4ef3660

Browse files
Revert "AC-12092_PHPUnit10: Fixed Risky testcase issues"
This reverts commit c3b7947.
1 parent 1867abc commit 4ef3660

File tree

8 files changed

+54
-5
lines changed

8 files changed

+54
-5
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-
[
48+
'with_attribute_id' => [
49+
'expectedResult' => [
5050
'result' => [
5151
[
5252
130 => [
@@ -101,8 +101,10 @@ public static function variationProvider()
101101
],
102102
],
103103
]
104-
],
105-
[
104+
]
105+
],
106+
'without_attribute_id' => [
107+
'expectedResult' => [
106108
'result' => [
107109
[
108110
130 => [

app/code/Magento/Csp/Test/Unit/Plugin/StoreAssetIntegrityHashesTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ protected function setUp(): void
6262
* Test After Deploy method of plugin
6363
*
6464
* @return void
65+
* @doesNotPerformAssertions
6566
*/
6667
public function testAfterDeploy(): void
6768
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ public function testBeforeCreateAccount(
433433
): void {
434434
if ($willThrowException) {
435435
$this->expectException(AuthorizationException::class);
436+
} else {
437+
$this->expectNotToPerformAssertions();
436438
}
437439
$this->authorizationMock
438440
->expects($this->once())

app/code/Magento/Customer/Test/Unit/Plugin/AsyncRequestCustomerGroupAuthorizationTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function testBeforePublishMass(
7575
): void {
7676
if ($willThrowException) {
7777
$this->expectException(AuthorizationException::class);
78+
} else {
79+
$this->expectNotToPerformAssertions();
7880
}
7981
$customer = $this->getMockForAbstractClass(CustomerInterface::class);
8082
$customer->method('getGroupId')->willReturn($groupId);

app/code/Magento/Swagger/Test/Unit/Controller/Index/IndexTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ protected function setUp(): void
6666
);
6767
}
6868

69+
/**
70+
* @doesNotPerformAssertions
71+
*/
6972
public function testExecute()
7073
{
7174
$this->pageConfigMock->expects($this->once())
@@ -91,6 +94,9 @@ public function testDispatchRejectsWhenDisabled()
9194
$this->indexAction->dispatch($request);
9295
}
9396

97+
/**
98+
* @doesNotPerformAssertions
99+
*/
94100
public function testDispatchIsSuccessfulWhenEnabled()
95101
{
96102
$request = self::getMockBuilder(Http::class)

lib/internal/Magento/Framework/Webapi/Test/Unit/InputLimit/DefaultPageSizeSetterTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ protected function setUp(): void
3737
$this->setter = new DefaultPageSizeSetter($this->configProvider);
3838
}
3939

40+
/**
41+
* @doesNotPerformAssertions
42+
*/
4043
public function testPageSizeIsNotSetWhenLimitingIsDisabled()
4144
{
4245
$this->configProvider->method('isInputLimitingEnabled')
@@ -51,6 +54,9 @@ public function testPageSizeIsNotSetWhenLimitingIsDisabled()
5154
$this->setter->processSearchCriteria($searchCriteria);
5255
}
5356

57+
/**
58+
* @doesNotPerformAssertions
59+
*/
5460
public function testPageSizeIsNotSetWhenAlreadySet()
5561
{
5662
$this->configProvider->method('isInputLimitingEnabled')
@@ -65,6 +71,9 @@ public function testPageSizeIsNotSetWhenAlreadySet()
6571
$this->setter->processSearchCriteria($searchCriteria);
6672
}
6773

74+
/**
75+
* @doesNotPerformAssertions
76+
*/
6877
public function testPageSizeIsSetWithPreferredConfigValue()
6978
{
7079
$this->configProvider->method('isInputLimitingEnabled')
@@ -83,6 +92,9 @@ public function testPageSizeIsSetWithPreferredConfigValue()
8392
$this->setter->processSearchCriteria($searchCriteria, 678);
8493
}
8594

95+
/**
96+
* @doesNotPerformAssertions
97+
*/
8698
public function testPageSizeIsSetWithPreferredFallbackValue()
8799
{
88100
$this->configProvider->method('isInputLimitingEnabled')

lib/internal/Magento/Framework/Webapi/Test/Unit/ServiceInputProcessorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ public function testArrayOfDataObjectPropertiesIsValidated()
414414
);
415415
}
416416

417+
/**
418+
* @doesNotPerformAssertions
419+
*/
417420
public function testDefaultPageSizeSetterIsInvoked()
418421
{
419422
$this->defaultPageSizeSetter->expects(self::once())

lib/internal/Magento/Framework/Webapi/Test/Unit/Validator/EntityArrayValidatorTest.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ protected function setUp(): void
4848
$this->inputArraySizeLimitValueMock
4949
);
5050
}
51-
51+
52+
/**
53+
* @doesNotPerformAssertions
54+
*/
5255
public function testAllowsDataWhenBelowLimitWhenUsingRouteInputLimit()
5356
{
5457
$this->configMock->expects(self::once())
@@ -62,6 +65,9 @@ public function testAllowsDataWhenBelowLimitWhenUsingRouteInputLimit()
6265
$this->validator->validateComplexArrayType("foo", array_fill(0, 5, []));
6366
}
6467

68+
/**
69+
* @doesNotPerformAssertions
70+
*/
6571
public function testFailsDataWhenAboveLimitUsingRouteInputLimit()
6672
{
6773
$this->expectException(InvalidArgumentException::class);
@@ -77,6 +83,9 @@ public function testFailsDataWhenAboveLimitUsingRouteInputLimit()
7783
$this->validator->validateComplexArrayType("foo", array_fill(0, 5, []));
7884
}
7985

86+
/**
87+
* @doesNotPerformAssertions
88+
*/
8089
public function testAllowsDataWhenBelowLimit()
8190
{
8291
$this->configMock->expects(self::once())
@@ -91,6 +100,9 @@ public function testAllowsDataWhenBelowLimit()
91100
$this->validator->validateComplexArrayType("foo", array_fill(0, 3, []));
92101
}
93102

103+
/**
104+
* @doesNotPerformAssertions
105+
*/
94106
public function testAllowsDataWhenBelowLimitUsingConfig()
95107
{
96108
$this->configMock->expects(self::once())
@@ -105,6 +117,9 @@ public function testAllowsDataWhenBelowLimitUsingConfig()
105117
$this->validator->validateComplexArrayType("foo", array_fill(0, 5, []));
106118
}
107119

120+
/**
121+
* @doesNotPerformAssertions
122+
*/
108123
public function testFailsDataWhenAboveLimit()
109124
{
110125
$this->expectException(InvalidArgumentException::class);
@@ -121,6 +136,9 @@ public function testFailsDataWhenAboveLimit()
121136
$this->validator->validateComplexArrayType("foo", array_fill(0, 4, []));
122137
}
123138

139+
/**
140+
* @doesNotPerformAssertions
141+
*/
124142
public function testFailsDataWhenAboveLimitUsingConfig()
125143
{
126144
$this->expectException(InvalidArgumentException::class);
@@ -137,6 +155,9 @@ public function testFailsDataWhenAboveLimitUsingConfig()
137155
$this->validator->validateComplexArrayType("foo", array_fill(0, 7, []));
138156
}
139157

158+
/**
159+
* @doesNotPerformAssertions
160+
*/
140161
public function testAboveLimitWithDisabledLimiting()
141162
{
142163
$this->configMock->expects(self::once())

0 commit comments

Comments
 (0)