Closed t-heuser closed 4 years ago
@oneserv-heuser Hi, thanks for reporting this. It's a known issue and listed here: https://devdocs.magento.com/guides/v2.4/release-notes/release-notes-2-4-0-commerce.html#dotdigital-1. It's due to be fixed with Magento's forthcoming 2.4.0-p1.
@sta1r The problem is that I cannot run integration tests (not even mine). I'm always getting this error, even if I execute a single test from one of my test classes which is definitly not using anything of this module.
@oneserv-heuser I guess PHPUnit scans all available tests before running yours or something. You can download a hotfix from https://magento.com/tech-resources/download - click on Patches.
@sta1r The patch isn't working, it just skips every file as it cannot find it. The other problem is that there is no patch for "dotmailer-magento2-extension-chat" where the same problem exists. It only patches "dotmailer-magento2-extension".
Edit: After renaming the file to .diff instead of .patch it's working. But still the tests in "dotmailer-magento2-extension-chat" are not fixed in this patch.
Thanks for flagging that oversight re Chat. I'll raise both issues with Magento.
In the meantime, there's just one test for Chat, can you manually add the : void
return type to get your suite to run?
Yeah, I'll do that in the meantime. Thanks for your help and pointing out the patch!
Every unit and integration test setUp() function has not the typed return type "void". This throws the following error:
PHP Fatal error: Declaration of Dotdigitalgroup\Email\Test\Integration\Model\Sync\Importer\BulkRecordsImportedSuccessTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp()
I guess that every test has to be refactored so that the setUp() functions don't look like this:
but instead like this:
The error appears since the magento 2.4.0 update as it's now using PhpUnit 9 which has the typed return value void in it's setup function.