Problem/Motivation

\Drupal\KernelTests\AssertContentTrait contains several assertions that are unused in core:

  • assertNoLinkByHref
  • assertNoLinkByHrefInMainRegion
  • assertNoEscaped
  • assertUniqueText
  • assertNoUniqueText
  • assertUniqueTextHelper
  • assertTextPattern
  • assertNoTitle
  • assertFieldsByValue
  • assertNoFieldByXPath
  • assertNoFieldByName
  • assertFieldById
  • assertNoFieldById
  • assertFieldChecked
  • assertNoFieldChecked
  • assertOption
  • assertOptionByText
  • assertOptionWithDrupalSelector
  • assertNoOption
  • assertOptionSelected
  • assertOptionSelectedWithDrupalSelector
  • assertNoOptionSelected
  • assertNoField
  • assertNoDuplicateIds

These tests were originally used back in Simpletest, but that is now obsolete. Some kernel tests do assert basic HTML output and there are a number of assertions remaining to do this, but most HTML tests are now functional tests that use WebAssert instead.

Steps to reproduce

Proposed resolution

Deprecate these methods for removal in Drupal 12.

Remaining tasks

Add change record
Update deprecation message to

  • to deprecated in 11.1.0 and removed in 12.0.0
  • to use the change record link

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#14 3227335-nr-bot.txt90 bytesneeds-review-queue-bot

Issue fork drupal-3227335

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

longwave created an issue. See original summary.

mondrake’s picture

Assigned: Unassigned » mondrake

On this

mondrake’s picture

Assigned: mondrake » Unassigned
mondrake’s picture

Issue summary: View changes

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone made their first commit to this issue’s fork.

quietone’s picture

Issue summary: View changes
quietone’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Deprecation seems straight forward.

Message/version appear correct.
CR lists all functions

LGTM

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Rebased

  • longwave committed 9b41c6a8 on 11.x
    Issue #3227335 by mondrake, quietone, smustgrave, longwave: Deprecate...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed 9b41c6a and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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