Skip to content

Commit fc9fecc

Browse files
committed
ACP2E-3541: "Something went wrong" error on checkout for inactive company
1 parent b21972c commit fc9fecc

File tree

7 files changed

+47
-67
lines changed

7 files changed

+47
-67
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2024 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

@@ -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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2023 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

@@ -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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2023 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

@@ -86,6 +86,7 @@ public function testBeforePublishMass(
8686
[$customer, 'Password1', '']
8787
];
8888
$this->authorizationMock
89+
->expects($this->once())
8990
->method('isAllowed')
9091
->with('Magento_Customer::manage')
9192
->willReturn($isAllowed);

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
2-
/**
3-
* Copyright 2015 Adobe
4-
* All Rights Reserved.
2+
/***
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66

77
declare(strict_types=1);
@@ -67,10 +67,9 @@ protected function setUp(): void
6767
}
6868

6969
/**
70-
* @return void
71-
* @throws NotFoundException
70+
* @doesNotPerformAssertions
7271
*/
73-
public function testExecute(): void
72+
public function testExecute()
7473
{
7574
$this->pageConfigMock->expects($this->once())
7675
->method('addBodyClass')
@@ -96,10 +95,9 @@ public function testDispatchRejectsWhenDisabled()
9695
}
9796

9897
/**
99-
* @return void
100-
* @throws NotFoundException
98+
* @doesNotPerformAssertions
10199
*/
102-
public function testDispatchIsSuccessfulWhenEnabled(): void
100+
public function testDispatchIsSuccessfulWhenEnabled()
103101
{
104102
$request = self::getMockBuilder(Http::class)
105103
->disableOriginalConstructor()

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2021 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66

77
declare(strict_types=1);
@@ -38,9 +38,9 @@ protected function setUp(): void
3838
}
3939

4040
/**
41-
* @return void
41+
* @doesNotPerformAssertions
4242
*/
43-
public function testPageSizeIsNotSetWhenLimitingIsDisabled(): void
43+
public function testPageSizeIsNotSetWhenLimitingIsDisabled()
4444
{
4545
$this->configProvider->method('isInputLimitingEnabled')
4646
->willReturn(false);
@@ -55,9 +55,9 @@ public function testPageSizeIsNotSetWhenLimitingIsDisabled(): void
5555
}
5656

5757
/**
58-
* @return void
58+
* @doesNotPerformAssertions
5959
*/
60-
public function testPageSizeIsNotSetWhenAlreadySet(): void
60+
public function testPageSizeIsNotSetWhenAlreadySet()
6161
{
6262
$this->configProvider->method('isInputLimitingEnabled')
6363
->willReturn(true);
@@ -72,9 +72,9 @@ public function testPageSizeIsNotSetWhenAlreadySet(): void
7272
}
7373

7474
/**
75-
* @return void
75+
* @doesNotPerformAssertions
7676
*/
77-
public function testPageSizeIsSetWithPreferredConfigValue(): void
77+
public function testPageSizeIsSetWithPreferredConfigValue()
7878
{
7979
$this->configProvider->method('isInputLimitingEnabled')
8080
->willReturn(true);
@@ -93,9 +93,9 @@ public function testPageSizeIsSetWithPreferredConfigValue(): void
9393
}
9494

9595
/**
96-
* @return void
96+
* @doesNotPerformAssertions
9797
*/
98-
public function testPageSizeIsSetWithPreferredFallbackValue(): void
98+
public function testPageSizeIsSetWithPreferredFallbackValue()
9999
{
100100
$this->configProvider->method('isInputLimitingEnabled')
101101
->willReturn(true);

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2014 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
77

@@ -415,10 +415,9 @@ public function testArrayOfDataObjectPropertiesIsValidated()
415415
}
416416

417417
/**
418-
* @return void
419-
* @throws Exception
418+
* @doesNotPerformAssertions
420419
*/
421-
public function testDefaultPageSizeSetterIsInvoked(): void
420+
public function testDefaultPageSizeSetterIsInvoked()
422421
{
423422
$this->defaultPageSizeSetter->expects(self::once())
424423
->method('processSearchCriteria')

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

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2021 Adobe
4-
* All Rights Reserved.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
55
*/
66

77
declare(strict_types=1);
@@ -50,12 +50,9 @@ protected function setUp(): void
5050
}
5151

5252
/**
53-
* @return void
54-
* @throws InvalidArgumentException
55-
* @throws \Magento\Framework\Exception\FileSystemException
56-
* @throws \Magento\Framework\Exception\RuntimeException
53+
* @doesNotPerformAssertions
5754
*/
58-
public function testAllowsDataWhenBelowLimitWhenUsingRouteInputLimit(): void
55+
public function testAllowsDataWhenBelowLimitWhenUsingRouteInputLimit()
5956
{
6057
$this->configMock->expects(self::once())
6158
->method('isInputLimitingEnabled')
@@ -69,12 +66,9 @@ public function testAllowsDataWhenBelowLimitWhenUsingRouteInputLimit(): void
6966
}
7067

7168
/**
72-
* @return void
73-
* @throws InvalidArgumentException
74-
* @throws \Magento\Framework\Exception\FileSystemException
75-
* @throws \Magento\Framework\Exception\RuntimeException
69+
* @doesNotPerformAssertions
7670
*/
77-
public function testFailsDataWhenAboveLimitUsingRouteInputLimit(): void
71+
public function testFailsDataWhenAboveLimitUsingRouteInputLimit()
7872
{
7973
$this->expectException(InvalidArgumentException::class);
8074
$this->expectExceptionMessage('Maximum items of type "foo" is 4');
@@ -90,12 +84,9 @@ public function testFailsDataWhenAboveLimitUsingRouteInputLimit(): void
9084
}
9185

9286
/**
93-
* @return void
94-
* @throws InvalidArgumentException
95-
* @throws \Magento\Framework\Exception\FileSystemException
96-
* @throws \Magento\Framework\Exception\RuntimeException
87+
* @doesNotPerformAssertions
9788
*/
98-
public function testAllowsDataWhenBelowLimit(): void
89+
public function testAllowsDataWhenBelowLimit()
9990
{
10091
$this->configMock->expects(self::once())
10192
->method('isInputLimitingEnabled')
@@ -110,12 +101,9 @@ public function testAllowsDataWhenBelowLimit(): void
110101
}
111102

112103
/**
113-
* @return void
114-
* @throws InvalidArgumentException
115-
* @throws \Magento\Framework\Exception\FileSystemException
116-
* @throws \Magento\Framework\Exception\RuntimeException
104+
* @doesNotPerformAssertions
117105
*/
118-
public function testAllowsDataWhenBelowLimitUsingConfig(): void
106+
public function testAllowsDataWhenBelowLimitUsingConfig()
119107
{
120108
$this->configMock->expects(self::once())
121109
->method('isInputLimitingEnabled')
@@ -130,12 +118,9 @@ public function testAllowsDataWhenBelowLimitUsingConfig(): void
130118
}
131119

132120
/**
133-
* @return void
134-
* @throws InvalidArgumentException
135-
* @throws \Magento\Framework\Exception\FileSystemException
136-
* @throws \Magento\Framework\Exception\RuntimeException
121+
* @doesNotPerformAssertions
137122
*/
138-
public function testFailsDataWhenAboveLimit(): void
123+
public function testFailsDataWhenAboveLimit()
139124
{
140125
$this->expectException(InvalidArgumentException::class);
141126
$this->expectExceptionMessage('Maximum items of type "foo" is 3');
@@ -152,12 +137,9 @@ public function testFailsDataWhenAboveLimit(): void
152137
}
153138

154139
/**
155-
* @return void
156-
* @throws InvalidArgumentException
157-
* @throws \Magento\Framework\Exception\FileSystemException
158-
* @throws \Magento\Framework\Exception\RuntimeException
140+
* @doesNotPerformAssertions
159141
*/
160-
public function testFailsDataWhenAboveLimitUsingConfig(): void
142+
public function testFailsDataWhenAboveLimitUsingConfig()
161143
{
162144
$this->expectException(InvalidArgumentException::class);
163145
$this->expectExceptionMessage('Maximum items of type "foo" is 6');
@@ -174,12 +156,9 @@ public function testFailsDataWhenAboveLimitUsingConfig(): void
174156
}
175157

176158
/**
177-
* @return void
178-
* @throws InvalidArgumentException
179-
* @throws \Magento\Framework\Exception\FileSystemException
180-
* @throws \Magento\Framework\Exception\RuntimeException
159+
* @doesNotPerformAssertions
181160
*/
182-
public function testAboveLimitWithDisabledLimiting(): void
161+
public function testAboveLimitWithDisabledLimiting()
183162
{
184163
$this->configMock->expects(self::once())
185164
->method('isInputLimitingEnabled')

0 commit comments

Comments
 (0)