Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Nov 2015 at 17:18 UTC
Updated:
26 Mar 2020 at 12:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
willzyx commentedComment #3
willzyx commentedComment #10
berdirGood catch, now that we have a legacy test for this method, we could assert quite easily that it returns itself again in \Drupal\Tests\Core\Entity\EntityManagerTest::testClearDisplayModeInfo.
Comment #11
vacho commentedOnly updating this patch. (rerolled)
Comment #12
jmikii commentedModified the test to check the return output
Comment #14
rosinegrean commentedComment #16
joachim commentedComment #17
alexpottThis method needs to return an instance of EntityManager. This would return that entity display repository service.
This should return $this->entityDisplayRepository.
We should assert that it equals $this->entityManager.
Comment #18
swatichouhan012 commentedHi, i have updated patch according comment #17, kindly review.
Comment #19
berdirYou need to change the willReturn() call above to $this->entityManager, and now you don't call the method anymore inside EntityManager.
Comment #20
kishor_kolekar commentedkindly review new patch.
Comment #21
berdirYeah, that's better. The willReturn() is correct although it technically doesn't matter anymore as we ignore that return.
Comment #22
alexpottCommitted and pushed 96a7c8f714 to 8.9.x and c9d2c9bbec to 8.8.x. Thanks!
I guess it is important to have EntityManager work the same as the EntityDisplayRepositoty...
Comment #23
alexpott