Problem/Motivation
There are still more that can be changed. Hopefully this is the last set.
Steps to reproduce
git grep -l FormattableMarkup | grep -i tests | sort -u | grep -v UserHooksTest | grep -v FormattableMarkupKernelTest | grep -v MarkupInterfaceComparatorTest | grep -v TwigMarkupInterfaceTest.php | grep -v FormattableMarkupTest.php | grep -v PlainTextOutputTest.php | grep -v TranslatableMarkupTest.php
Proposed resolution
Remove these usages
- core/modules/comment/tests/src/Functional/CommentTestBase.php
- core/modules/config/tests/config_test/src/ConfigTestForm.php
- core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestPlaceholders.php
- core/modules/node/tests/src/Functional/NodeTestBase.php
- core/modules/node/tests/src/Traits/ContentTypeCreationTrait.php
- core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php
- core/modules/system/tests/modules/entity_test/src/Hook/EntityTestHooks.php
- core/modules/system/tests/modules/menu_test/src/TestControllers.php
- core/modules/system/tests/modules/session_test/src/Form/SessionTestForm.php
- core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php
- core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
- core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php
- core/tests/Drupal/Tests/Core/Config/Checkpoint/LinearHistoryTest.php
- core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php
- core/tests/Drupal/Tests/Core/Mail/Plugin/Mail/SymfonyMailerTest.php
No change needed
In comment or string array key
- core/tests/Drupal/KernelTests/AssertContentTrait.php
- core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php
- core/tests/Drupal/Tests/Core/Logger/LogMessageParserTest.php
- core/tests/Drupal/Tests/WebAssert.php
Tests fail when Formattable markup not used
- core/modules/search/tests/modules/search_extra_type/src/Plugin/Search/SearchExtraTypeSearch.php
- core/modules/system/tests/modules/update_test_schema/src/Hook/UpdateTestSchemaRequirements.php
- core/modules/system/tests/modules/update_test_schema/update_test_schema.install
- core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3569421
Show commands
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:
- 3569421-remove-remaining-unnecessary
changes, plain diff MR !14482
Comments
Comment #3
quietone commentedComment #4
smustgrave commentedAppears to need a rebase please.
Comment #5
quietone commentedRebased. There was a conflict in \Drupal\Tests\comment\Functional\CommentTestBase::setCommentAnonymous that required a new line of code to get a value from an Enum. So setting to review for that.
Comment #6
smustgrave commentedFrom what I can tell these are good conversion (just using eyeball test). To avoid multiple rerolls for quietone going to go ahead and mark. Know there is a parent ticket for this so if any left overs they'll get covered.
Comment #7
longwaveAdded some questions to the MR.
Also there's a bunch of cases where we are outputting markup and were relying on the
@syntax to escape HTML, do we need to concern ourselves with explicitly escaping in any cases here?Comment #8
quietone commentedI updated the MR for @longwave's feedback.
Comment #9
dcam commentedI found another issue. Please see the comment on the MR.
Comment #10
quietone commented@dcam, thanks for the review and the suggestion.
I applied the suggestion and made a followup to possibly remove the unused assertion methods in NodeTestBase, #3608091: Remove unused assertion methods in \Functional\NodeTestBase.
Comment #11
dcam commentedLooks good. Thank you.
Comment #12
catchCommitted/pushed to main, thanks!
Doesn't cherry-pick to 11.x and don't think we need it there.