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

Command icon 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:

Comments

quietone created an issue. See original summary.

quietone’s picture

Issue summary: View changes
Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Appears to need a rebase please.

quietone’s picture

Status: Needs work » Needs review

Rebased. 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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

From 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.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Added 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?

quietone’s picture

Status: Needs work » Needs review

I updated the MR for @longwave's feedback.

dcam’s picture

Status: Needs review » Needs work

I found another issue. Please see the comment on the MR.

quietone’s picture

Status: Needs work » Needs review

@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.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Thank you.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, thanks!

Doesn't cherry-pick to 11.x and don't think we need it there.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed 0eba023b on main
    task: #3569421 Remove remaining unnecessary uses of Formattable markup...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.