Fixed
Project:
Drupal core
Version:
11.x-dev
Component:
toolbar.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Jul 2026 at 09:35 UTC
Updated:
22 Jul 2026 at 14:29 UTC
Jump to comment: Most recent
Move tests of Toolbar from other modules to the toolbar module.
Aside from the moved tests this includes changing AlertsJsonFeedTest.php from a functionaljavascript test to a functional test.
Review
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 #3
quietone commentedComment #4
smustgrave commentedDisclosure used AI to come up with a grep
And found a few more tests outside the toolbar module
core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
core/modules/shortcut/tests/src/Functional/ConfigTranslationListUiTest.php
core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
core/modules/shortcut/tests/src/Kernel/ShortcutCacheTagsTest.php
core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php
core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
core/modules/announcements_feed/tests/src/Functional/AnnouncementsCacheTest.php
core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php
Assuming shortcut we can ignore as it's being deprecated too but the others seem valid
Comment #5
quietone commented@smustgrave, thanks for looking at this.
The search above isn't going to provide the results we need. For two reasons that I can see, 1) they are limited to 'toolbar' in the $modules parameter and 2) they do not take into account the other issue, #3611749: Remove toolbar from tests where it is not needed.
After apply the diff from this issue and #3611749: Remove toolbar from tests where it is not needed. I started searching for "'toolbar'", using grep. Initially, modules such as jsonapi were not excluded. It was only added after checking the use of "'toolbar'" in any tests from the module. After all the checking, the result is
Those tests will require more work so will be done in a separate issue.
Comment #6
smustgrave commentedAh my mistake! That MR has been merged so I applied again and ran the same grep and got the same results as you did in #5 so believe this one is good.
Comment #7
catchCommitted/pushed to main and cherry-picked to 11.x, thanks!
Comment #12
quietone commentedThis is causing test failures on 11.x, https://git.drupalcode.org/project/drupal/-/pipelines/897597/test_report...
Comment #15
catchThere was a mistake in the test class namespace - pushed a commit to both branches to fix this.
Comment #21
quietone commentedSo, I has incorrect namespaces in 5 tests files, including an incorrect directory name. The test that should have detected those mistakes did not and I made an issue for that, #3612498: PhpUnitApiFindAllClassFilesTest not finding namespace errors.
I tried to revert but had problems locally because of recently reinstalling Debian stable. While i was doing that catch made a fix on main, then another. We finally connected in Slack which resulted in updated MR for main and a new MR for 11.x. The 11.x one is passing tests, so that is promising.
I compared the two diffs and they agree, and tests are passing on 11.x so I am setting this back to RTBC.
Comment #22
quietone commentedComment #27
catchCommitted/pushed to main and 11.x, thanks!