Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jun 2014 at 14:51 UTC
Updated:
6 Sep 2014 at 22:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andypostSeems we have no tests at all
Comment #2
andypostI think no reason in tests
Comment #3
andypostTest should make sure the proper name for for form when bundle name is the same as entity type name
Comment #4
berdirShould be possible to use the entity_test form for that, the default bundle there is entity_test and it has a bundle key.
Comment #5
tim.plunkettThis absolutely needs tests. It should be easy enough to write a unit test for this, right?
It should cover both entity types with and without a bundle key.
The change looks fine.
Comment #6
andypostHere's a unit test
Comment #8
tim.plunkettLooks good to me, thanks @andypost!
Comment #9
alexpottThere is no test where the entity and bundle have the same name?
Comment #10
andypostThe failed test shows the case:
this is the case, because the test uses Entity and it's method bundle() returns entity name
Comment #11
andypostAdded case for user with bundle user.
Now fail test shows 3 failures (1 user bundle and 2 for empty bundle)
Comment #13
webchickCommitted and pushed to 8.x. Thanks!