Entity form controllers already have a fair test coverage, since every real controller extending the base class has test coverage. However we need a form controller also for the test entity in order to ensure the generic logic is sane and functional. Moreover this is needed to provide proper test coverage for the upcoming Entity Translation UI that has no notion of real entities and thus has to work with the test one. As a bonus this will allow to test the UI with multilingual properties, which currently only the test entity storage controller supports.
Comments
Comment #1
plachSee commit c6725b5 and the whole topic branch.
Comment #2
plachTagging
Comment #3
plachBetter title
Comment #3.0
plachUpdated issue summary
Comment #3.1
plachUpdated issue summary.
Comment #4
plachMoving to the core queue since this is a prerequisite for the work on the Entity Translation UI.
We need a patch from the topic branch here, back to active meanwhile.
Comment #5
plachMore tags
Comment #6
plachBumping to major since this is a blocker for the first UI patch.
Comment #6.0
plachUpdated issue summary.
Comment #7
peximo CreditAttribution: peximo commentedThe attached patch implements basic entity test page callbacks for CRUD operations and the related form controller.
It also adds some tests for this functions.
Comment #8
peximo CreditAttribution: peximo commentedComment #9
plachSimple and straightforward.
Comment #10
plachSorry, just realized that the delete page callback is not used and needs to be removed:
Since we are rolling a new patch can we perform the minor/cosmetic changes below?
It would be nice to add a comment explaining why we need this, something like:
"Always load the entity from the database to ensure that changes are correctly picked up."
Can we move this line up? Also, the PASS_THROUGH should not be needed here, since there is no HTML in the passed string.
Comment #11
peximo CreditAttribution: peximo commentedModified as suggested.
Comment #12
plachBack to RTBC.
Comment #13
catchThis no longer applies after the entity.module > \Drupal\Core\Entity move.
Comment #14
plachRerolling
Comment #15
fagoAfter saving $entity->isNew() will never return TRUE, so this won't work as intended.
Comment #16
plachRerolled and fixed #15 (the interdiff covers only the latter change).
Comment #17
plachForgot to adjust some PHP docs.
Comment #18
plachI think #17 should be RTBC again.
Comment #19
webchickLooks good!
Committed and pushed to 8.x. Thanks!
Comment #20
Gábor HojtsyThanks, removing from the sprint.
Comment #21.0
(not verified) CreditAttribution: commentedUpdated issue summary.