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
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 3227335-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3227335
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:
- 3227335-deprecate-unused-kernel
changes, plain diff MR !1041
Comments
Comment #2
mondrakeOn this
Comment #4
mondrakeComment #5
mondrakeComment #11
quietone commentedComment #12
quietone commentedComment #13
smustgrave commentedDeprecation seems straight forward.
Message/version appear correct.
CR lists all functions
LGTM
Comment #14
needs-review-queue-bot commentedThe 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.
Comment #15
smustgrave commentedRebased
Comment #17
longwaveCommitted 9b41c6a and pushed to 11.x. Thanks!