Skip to content

Commit 16d2c9e

Browse files
committed
AC-8834::2.4.7-Beta1-Composer Integration Test Failures-PHP 8.2-phpunit deprecated expectingerror function is removed
1 parent 87cd334 commit 16d2c9e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/StockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function setUp(): void
5454
public function testValidate(): void
5555
{
5656
$this->expectException(LocalizedException::class);
57-
$this->expectErrorMessage((string)__('Please enter a valid number in this field.'));
57+
$this->expectExceptionMessage((string)__('Please enter a valid number in this field.'));
5858
$product = $this->productFactory->create();
5959
$product->setQuantityAndStockStatus(['qty' => 'string']);
6060
$this->model->validate($product);

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/AuthorizationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function postRequestData(): array
136136
public function testAuthorizedSavingOfWithException(array $data): void
137137
{
138138
$this->expectException(AuthorizationException::class);
139-
$this->expectErrorMessage('Not allowed to edit the product\'s design attributes');
139+
$this->expectExceptionMessage('Not allowed to edit the product\'s design attributes');
140140
$this->request->setPost(new Parameters($data));
141141

142142
/** @var Product $product */

dev/tests/integration/testsuite/Magento/Catalog/Model/ProductWebsiteLinkRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testSaveWithoutWebsiteId(): void
6565
$productWebsiteLink = $this->productWebsiteLinkFactory->create();
6666
$productWebsiteLink->setSku('unique-simple-azaza');
6767
$this->expectException(InputException::class);
68-
$this->expectErrorMessage((string)__('There are not websites for assign to product'));
68+
$this->expectExceptionMessage((string)__('There are not websites for assign to product'));
6969
$this->productWebsiteLinkRepository->save($productWebsiteLink);
7070
}
7171

dev/tests/integration/testsuite/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/SuffixTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function setUp(): void
8383
public function testSaveWithError(): void
8484
{
8585
$this->expectException(LocalizedException::class);
86-
$this->expectErrorMessage((string)__('Anchor symbol (#) is not supported in url rewrite suffix.'));
86+
$this->expectExceptionMessage((string)__('Anchor symbol (#) is not supported in url rewrite suffix.'));
8787
$this->model->setValue('.html#');
8888
$this->model->beforeSave();
8989
}

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ protected function getUsedProducts()
656656
*/
657657
public function testAddCustomOptionToConfigurableChildProduct(): void
658658
{
659-
$this->expectErrorMessage(
659+
$this->expectExceptionMessage(
660660
'Required custom options cannot be added to a simple product that is a part of a composite product.'
661661
);
662662

0 commit comments

Comments
 (0)