Problem/Motivation

phpunit testst are failing with Drupal 12

1) Drupal\Tests\ui_patterns\Kernel\ComponentPluginManagerTest::testHookComponentInfoAlter
Exception: Kernel test classes must specify the #[RunTestsInSeparateProcesses] attribute

There were already a warning in Drupal 11.

Proposed resolution

Add the expected attributes. It is OK to add it in our current main branch because compatible with Drupal 11.

But let's check if it is OK with Drupal 10. There is still 2 Drupal 10 for every Drupal 11: https://new.drupal.org/project/usage/drupal

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pdureau created an issue. See original summary.

aayushpathak made their first commit to this issue’s fork.

aayushpathak’s picture

working on it !

aayushpathak’s picture

Status: Active » Needs review

The original issue related to Drupal 12 PHPUnit process isolation is being resolved with this MR.
The current pipeline failure appears to be caused by unrelated functional test failures in LayoutBuilderRenderTest and not by the original #[RunTestsInSeparateProcesses] issue addressed in this ticket.

pdureau’s picture

Status: Needs review » Needs work

Thanks a lot Aayush.

The formatting changes are nice because only in the files modified in the scope of the ticket.

I agree with your point of view about pipeline failures, but we will need to investigate anyway before RTBC because they don't happen in the main (2.0.x) branch.

Because we need this to be fixed in order to unlock the run of phpunit (previous major) test and check everything is OK with Drupal 10.

pdureau’s picture

For information, I have the same phpunit fail while working on #3590426: Reduce the API scope of our plugin managers:

1) Drupal\Tests\ui_patterns_layouts\Functional\LayoutBuilderRenderTest::testRenderSlotsReplaced
Behat\Mink\Exception\ElementTextException: The text "field_text_1 value" was not found in the text of the element matching css ".ui-patterns-test-form-replaced-slot".
2) Drupal\Tests\ui_patterns_layouts\Functional\LayoutBuilderRenderTest::testRenderSlots
Behat\Mink\Exception\ElementTextException: The text "field_text_1 value" was not found in the text of the element matching css ".ui-patterns-slots-slot".
pdureau’s picture

Status: Needs work » Needs review

Because we have those same errors in many issues, let's ask the maintainers and move the ticket to "Needs review"