Improve test coverage around node revisions and the deleteRevision()

Created on 18 July 2023, about 1 year ago

Problem/Motivation

Found while working on 🐛 Revert and Delete actions should not be available for the current revision Fixed after making a change to, \Drupal\Core\Entity\ContentEntityStorageBase::deleteRevision() none of the tests failed, which shows missing test coverage around deleteRevision().

See: https://git.drupalcode.org/project/drupal/-/merge_requests/4359#note_191874

Steps to reproduce

Proposed resolution

In \Drupal\Tests\node\Functional\NodeRevisionsTest::testRevisions() what the test coverage should do is create a new entity, try to delete the current revision id, except an exception. Then create a new non-default revision, try to delete the default revision, still get an exception and then create a new revision as default revision, and then verify that the old revision can not be deleted.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component
Entity 

Last updated about 4 hours ago

Created by

🇮🇳India yash.rode pune

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024