[buddypress-trac] [BuddyPress Trac] #7234: Implement get_object_by_id() method in message factory
buddypress-trac
noreply at wordpress.org
Mon Aug 29 14:25:43 UTC 2016
#7234: Implement get_object_by_id() method in message factory
------------------------------+------------------------------
Reporter: jdgrimes | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------+------------------------------
Comment (by jdgrimes):
I've discovered that the factory really doesn't work at all (it doesn't
generate any default values). It always fails (silently) because the
`$default_generation_definitions` are only allowed to contain scalar
values or `WP_UnitTest_Generator_Sequence` instances, but `'recipients'`
is included in the defaults there as `array()`. The solution is to omit
the default for `'recipients'`, as it really isn't needed there. I've done
this in [attachment:7234.2.diff]. Better yet, the defaults for the
recipients could be set in `create_object()` instead, with a recipient
created on the fly if none are specified, since `messages_new_message()`
requires that there be a recipient of the message.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7234#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list