[buddypress-trac] [BuddyPress Trac] #6126: Post types activities are not set when directly using BP_Activity_Activity( $id )
buddypress-trac
noreply at wordpress.org
Fri Jan 16 18:37:07 UTC 2015
#6126: Post types activities are not set when directly using BP_Activity_Activity(
$id )
-----------------------------------+---------------------
Reporter: imath | Owner: djpaul
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.2
Component: Activity | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch 2nd-opinion |
-----------------------------------+---------------------
Comment (by boonebgorges):
> i've found that in some tests i wasn't resetting the
$bp->activity->actions global the right way
If you find yourself doing this a lot, consider doing the resetting in the
specific class's `tearDown()`, or even in `BP_UnitTestCase::tearDown()`
(or `setUp()` I suppose). See how WP does it with post_type, taxonomy, and
other globals:
https://core.trac.wordpress.org/browser/tags/4.1/tests/phpunit/includes/testcase.php#L22
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6126#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list