Problem/Motivation

Looks like \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::getUrl() is unneeded.

The simpletest bit in the comment kinda gives it away already:

    // \Drupal\simpletest\AssertContentTrait needs this for ::assertFieldByName
    // to work.

As the ever watchful longwave pointed out: It's parent \Drupal\KernelTests\AssertContentTrait::getUrl() is also in the land of the dodos and can be removed.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Spokje created an issue. See original summary.

Spokje’s picture

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Active » Needs review
longwave’s picture

I think the parent implementation is unused as well - I discovered the same in #3293216: Rename references to Simpletest in tests but I think it's clearer to handle all this in this separate issue.

Spokje’s picture

Status: Needs review » Closed (duplicate)
longwave’s picture

Status: Closed (duplicate) » Needs work

Sorry - I meant clearer to handle this in this issue :)

Let's delete AssertContentTrait::getUrl() here as well, as it's not used.

Spokje’s picture

Assigned: Unassigned » Spokje

Ah, misunderstood that completely :)

Spokje’s picture

Title: Remove unneeded \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::getUrl() » Remove unneeded TextFormatElementFormTest::getUrl() and AssertContentTrait::getUrl()
Issue summary: View changes
Spokje’s picture

Spokje’s picture

Spokje’s picture

Component: filter.module » phpunit
Assigned: Spokje » Unassigned
Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thank you @Spokje.

alexpott’s picture

Version: 9.4.x-dev » 9.5.x-dev

Committed and pushed d17bde5df6 to 10.1.x and f8cbc71d31 to 10.0.x. Thanks!

I think this is okay to do in 10.0.x this methods are long unused in core. I think given the extremely niche use-case - to make a content assertion work in KTB - it is fine to remove this from D10 alone and not deprecate it 9.x..

Going to leave as RTBC against 9.x and get release manager opinion.

  • alexpott committed d17bde5 on 10.1.x
    Issue #3293952 by Spokje, longwave: Remove unneeded...

  • alexpott committed f8cbc71 on 10.0.x
    Issue #3293952 by Spokje, longwave: Remove unneeded...
catch’s picture

Version: 9.5.x-dev » 10.0.x-dev
Status: Reviewed & tested by the community » Fixed

I think we can just mark this fixed for 10.0.x, dead code removal is a good major release thing.

Status: Fixed » Closed (fixed)

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