Adobe Commerce 2.4.0 known issue: integration tests fail

This article provides a patch for the Adobe Commerce 2.4.0 issue where integration tests are failing because the declaration of Dotdigitalgroup\Email\Test\Integration\Model\Sync\Importer\ImporterFailedTest::setUp() is not compatible with PHPUnit 9 which is used for 2.4.0.

Affected products and versions

  • Adobe Commerce on cloud infrastructure 2.4.0
  • Adobe Commerce on-premises 2.4.0

Issue

Steps to reproduce

Run 2.4.0 integration tests.

Expected result

Tests pass.

Actual result

PHP Fatal error: Declaration of Dotdigitalgroup\Email\Test\Integration\Model\Sync\Importer\ImporterFailedTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /var/www/vendor/dotmailer/dotmailer-magento2-extension/Test/Integration/Model/Sync/Importer/ImporterFailedTest.php on line 36

Solution

Apply the patch provided in this article.

Patch

The patch is attached to this article. To download it, scroll down to the end of the article and click the file name, or click the following link:

BUNDLE-2684-composer.patch

Compatible Adobe Commerce versions:

The patch was created for:

  • Adobe Commerce on cloud infrastructure 2.4.0
  • Adobe Commerce on-premises 2.4.0

How to apply the patch

See How to apply a composer patch provided by Adobe in our support knowledge base for instructions.

Attached Files

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a