Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Aug 2016 at 07:17 UTC
Updated:
16 Jul 2025 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chi commentedThe test will fail now.
Comment #3
chi commentedComment #15
smustgrave commentedStill valid in 9.5
Would the proposed solution be to remove the test completely?
Comment #16
ameymudras commentedI think it makes sense to delete the test altogether in this case. Ive included a very basic patch for the same
Comment #17
smustgrave commentedCan I ask though why we wouldn't replace it though?
What was this originally testing? Should we still test that?
Comment #19
smustgrave commentedNeeds a reroll but appears to be dead code maybe?
Comment #20
_utsavsharma commentedRerolled for 10.1.x.
Comment #21
smustgrave commentedPretty convinced this is deadcode but will see what the committers say.
Comment #22
quietone commentedThe route 'user.autocomplete' was removed in Drupal 8.0.x #2434697: Remove UserAutocompleteController.
There is another instance of the string 'user/autocomplete'. That should be investigated here as well.
Comment #26
mstrelan commented#22 - The other reference to
user/autocompletewas removed in #3511071: NodeCreationtest::testAuthorAutocomplete has incorrect selector for falsey checkI've created an MR to remove the test. But kind of agree with #17:
Good question. The test was meant to ensure that the theme registry was not initialized when making a request to the autocomplete route. The
theme_testmodule has an event subscriber that throws a "registry initialized" exception if the theme registry is initialized. This currently only applies to the'system.entity_autocomplete'route but previously applied to'user.autocomplete'and'user.autocomplete_anonymous', before #2434697: Remove UserAutocompleteController. I'm not sure if there is any test that's checking for that exception, so perhaps that should be removed too? Or we refactor FastTest to use the'system.entity_autocomplete'route instead.Comment #27
mstrelan commentedI did some more digging. We can use
'system.entity_autocomplete'in the test like so:However we never enter
ThemeTestSubscriber::onViewso the exception is never thrown anyway.I think we can just remove the test.
Comment #28
smustgrave commentedThanks @mstrelan for digging into that! Agree with your findings.
Comment #29
catchDoes that event subscriber also need to be removed from theme_test module then?
Comment #30
mstrelan commentedRemoved the onView part of the event subscriber. Adding a related issue too.
Comment #31
smustgrave commentedFeedback from @catch appears to be addressed.
Comment #34
catchI think the overall assessment that this test never worked, can't test what it's trying to and should just go makes sense. Maybe we theoretically might have some test coverage missing, but that's already been the case for several years and we'd need to start writing the test again from scratch, in which case the current test does not help with that. Committed/pushed to 11.x, thanks!