- 🇦🇺Australia acbramley
So this code was introduced in #1886448: Rewrite the theme registry into a proper service → , swapped from _theme_registry_callback and _theme_test_load_registry which just did a print.
I grepped for the string "registry initialized" which is checked in \Drupal\Tests\system\Functional\Theme\FastTest
Debugging that test, ThemeTestSubscriber::onView is never hit. This is because MainContentViewSubscriber::onViewRenderArray runs before it and calls setResponse which stops propagation.
Increasing the priority of ::onView to 10 will cause it to run BUT exposes even more issues with the test.
1. the test hits user/autocomplete which is not an autocomplete path, it's a user path. The test hits a 404 page
2. The test checks the response contains the account name, which it does, but not in any markup.
3. The test checks for the absence of the "registry initialized" text, which I don't think would even happen if everything was working as expected because the event subscriber throws an exception, it doesn't print anything.