Closed (fixed)
Project:
Drupal core
Version:
main
Component:
rest.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2026 at 20:18 UTC
Updated:
19 Mar 2026 at 14:20 UTC
Jump to comment: Most recent
#3462264: Skip unsupported methods in rest/jsonapi tests in an efficient way skipped some REST tests that exit immediately. But since that landed, PHPUnit has changed the test runner and #[Before] does not skip setUp():
$ ddev test core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php --filter testPostDxWithoutCriticalBaseFields
PHPUnit 11.5.50 by Sebastian Bergmann and contributors.
Runtime: PHP 8.5.1
Configuration: /var/www/html/drupal/core/phpunit.xml.dist
S 1 / 1 (100%)
Time: 00:07.197, Memory: 6.00 MB
OK, but some tests were skipped!
Tests: 1, Assertions: 0, Skipped: 1.
Move the #[Before] code to setUp().
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
Comment #2
longwaveThis affects 116 tests, using 7 seconds each of my CPU time, which would be 13.5 minutes total. Not sure how much impact this will have on CI, but surely some?
After this fix:
Comment #4
smustgrave commentedLooks like a good cleanup to me. Not sure how to measure but even a few seconds is worth it right?
Comment #5
catchCommitted/pushed to main, thanks!