Skip to:
Content

BuddyPress.org

Changeset 11809


Ignore:
Timestamp:
01/10/2018 10:34:20 PM (7 years ago)
Author:
djpaul
Message:

Tests: fix activity post type tracking tests after r11793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/activity/functions/bpActivityGetActions.php

    r10545 r11809  
    1010
    1111    public function setUp() {
     12        parent::setUp();
    1213        $bp = buddypress();
    1314
     
    2021
    2122    public function tearDown() {
     23        parent::tearDown();
    2224        $bp = buddypress();
    2325
     
    146148     */
    147149    public function test_sort_new_post_type_twice() {
     150        $reset_activity_track = buddypress()->activity->track;
     151
    148152        $actions = bp_activity_get_actions();
    149153        $expected = array(
     
    164168        ) );
    165169
     170        /*
     171         * Reset manually as bp_activity_get_actions() -- at the top of this test --
     172         * sets ->track[] for the previously-registered post types.
     173         */
     174        buddypress()->activity->track = bp_activity_get_post_types_tracking_args();
     175
    166176        $actions = bp_activity_get_actions();
    167177
     
    175185
    176186        $this->assertSame( $expected, wp_list_pluck( (array) $actions->blogs, 'key' ) );
     187
     188        buddypress()->activity->track = $reset_activity_track;
    177189    }
    178190
Note: See TracChangeset for help on using the changeset viewer.