Problem/Motivation

Replace annotation-based test metadata with PHP attributes.

Please DO NOT change the MR here manually. The patch is automatically generated by the MR at #3446380: [no-commit] Define a Rector rule to convert test annotations to attributes.

Proposed resolution

In this issue, convert modules' kernel tests, with the exception of:

  • /core/modules/editor/tests/src/Kernel/EditorValidationTest.php
  • /core/modules/node/tests/src/Kernel/NodeTypeValidationTest.php
  • /core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php
  • /core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php

that all require manual conversion in a follow up.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#8 3543586-nr-bot_amf7zed1.txt391.02 KBneeds-review-queue-bot

Issue fork drupal-3543586

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

mondrake created an issue. See original summary.

mondrake’s picture

Title: Convert test annotations to attributes in modules' Kernel tests using Rector rule » [PP-1] Convert test annotations to attributes in modules' Kernel tests using Rector rule
Status: Active » Postponed
Related issues: +#3543658: Migrate plugin tests using @cover annotation to indicate the plugin class block conversion to attributes
mondrake’s picture

Title: [PP-1] Convert test annotations to attributes in modules' Kernel tests using Rector rule » Convert test annotations to attributes in modules' Kernel tests using Rector rule
Status: Postponed » Active
mondrake’s picture

Status: Active » Needs review

This would be the last issue doing bulk automated conversions via rector. There will still be some outliers to fix, but that will be done manually in a cleanup follow on issue.

mondrake’s picture

Assigned: mondrake » Unassigned
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new391.02 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. 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.

mondrake’s picture

Status: Needs work » Needs review
Issue tags: +no-needs-review-bot
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Change seems inline with the other changes like this.

mondrake’s picture

Issue tags: +Avoid commit conflicts

  • catch committed c41bf5b2 on 11.x
    Issue #3543586 by mondrake: Convert test annotations to attributes in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

The rector rule works pretty great here, so I just reviewed the first dozen files or so.

Committed/pushed to 11.x, thanks!

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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