Closed (fixed)
Project:
Examples for Developers
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2021 at 19:35 UTC
Updated:
5 Jun 2026 at 22:00 UTC
Jump to comment: Most recent
Comments
Comment #5
avpadernoComment #10
oily commentedComment #11
avpadernoComment #12
avpadernoComment #13
oily commentedI have tested the theming_example module on branch 5.0.x on Drupal 12.x-dev.
Running the functional test led to an exception:
Exception: Functional/FunctionalJavascript test classes must specify the #[RunTestsInSeparateProcesses] attributeRunning ThemingExampleTest.php led to 4x deprecations and a test failure. These can be cured by adding array and string return types to both the forms on the ::buildForm() and ::getFormId() methods respectively.
After also adding the #[RunTestsInSeparateProcesses] attribute to the test class, the test passed.
It seems that most of the examples tests are FunctionalJavascript tests. They now need the #[RunTestsInSeparateProcesses] for the tests to run cleanly. This is a blocker to the tests as it masks the 'real' results of the tests.
I am adding it as a task in a follow up.
Comment #14
avpadernoPHPUnit tests need some work; that is why GitLab CI has been set not to run them.
For example, there are many tests which verify the routes defined by the modules are accessible, which is not what tests should do. (Those tests also hard code the module's route paths.) Tests are for verifying new commits do not introduce errors which are then difficult to notice.
Comment #15
oily commentedRe: #14, I was wondering why the tests had been disabled.. Makes sense.
Agreed. Would be good to start with lowest hanging fruit (easiest of the modules to create tests for). And to maybe create an issue. In it, to define exactly which errors the tests need to prevent?..
Comment #18
oily commentedI think this is ready for another review.
Comment #19
avpadernoComment #21
avpaderno