Found out when working on the field info cache optimization in #1040790: _field_info_collate_fields() memory usage :

EntityFieldQueryTestCase::setup() does not properly declare the bundles it adds on test field types.
In order to have the bundles appear in entity_get_info(), and in the current state of the field_test.module, the function to call is field_test_create_bundle() - which takes care of calling field_attach_create_bundle().

Not critical for the current state of Entity API / Field API, but working on bundles that are not listed in entity_get_info() is not recommended.

Given the strictly test-internal nature of this, and probable low amount of reviewers for that, I'll be bold and push this directly to RTBC. Feel free to scold :-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

While I wish I could bounce this back to needs work just to make a point, this makes perfect sense, and I would call this RTHC.

catch’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs backport to D7

Makes sense and I'll accept the post-facto RTBC.

Committed/pushed to 8.x, this will need backport.

yched’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
1.95 KB

D7 patch.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x. Thanks!

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