palantirnet / palantir-behat-extension

Additional step definitions for testing Drupal sites using Behat.
1 stars 4 forks source link

Handle single value fields reliably in entity reference fields. #16

Closed becw closed 8 years ago

becw commented 8 years ago

entity_metadata_wrapper() and its ->value() method will return a single entity object or an array of entity objects, depending on either the field configuration or the field contents. It's kind of unpredictable, and rather than working around it, this PR uses the more consistent field_get_items() from Drupal core.