Problem/Motivation
PHPUnit (Next Major) is reporting errors like:
1) Drupal\Tests\verify_email\Functional\VerifyEmailRoutingTest::testVerifyEmailRoute
Exception: Functional/FunctionalJavascript test classes must specify the #[RunTestsInSeparateProcesses] attribute
/builds/project/verify_email/web/core/tests/Drupal/Tests/BrowserTestBase.php:309
/builds/project/verify_email/tests/src/Functional/VerifyEmailRoutingTest.php:56Steps to reproduce
View the pipeline.
Proposed resolution
- The fix should be a very simple case of adding the
#[RunTestsInSeparateProcesses]before every test class. - However, to keep
phpstan (previous major)from failing, we should also add the following to.gitlab-ci.ymlin thephpstan (previous major)before script:
- sed -i '/#\[VerifyEmailRoutingTest\]/d' $DRUPAL_PROJECT_FOLDER/tests/src/Functional/*.php - sed -i '/#\[VerifyEmailRoutingTest\]/d' $DRUPAL_PROJECT_FOLDER/tests/src/Kernel/*.php
Remaining tasks
- Add attributes to tests.
- Add to before script to remove them for previous major.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments