Changeset 10515 for trunk/tests/phpunit/testcases/activity/functions.php
- Timestamp:
- 02/05/2016 03:37:27 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/functions.php
r10412 r10515 870 870 } 871 871 872 /**873 * @group activity_action874 * @group bp_activity_get_actions875 */876 public function test_bp_activity_get_actions_should_sort_by_position() {877 $old_actions = bp_activity_get_actions();878 buddypress()->activity->actions = new stdClass;879 880 register_post_type( 'foo5', array(881 'public' => true,882 'supports' => array( 'buddypress-activity' ),883 'bp_activity' => array(884 'component_id' => 'foo',885 'action_id' => 'foo_bar_5',886 'position' => 5,887 ),888 ) );889 890 register_post_type( 'foo50', array(891 'public' => true,892 'supports' => array( 'buddypress-activity' ),893 'bp_activity' => array(894 'component_id' => 'foo',895 'action_id' => 'foo_bar_50',896 'position' => 50,897 ),898 ) );899 900 register_post_type( 'foo25', array(901 'public' => true,902 'supports' => array( 'buddypress-activity' ),903 'bp_activity' => array(904 'component_id' => 'foo',905 'action_id' => 'foo_bar_25',906 'position' => 25,907 ),908 ) );909 910 $actions = bp_activity_get_actions();911 912 $expected = array(913 'foo_bar_5',914 'foo_bar_25',915 'foo_bar_50',916 );917 $foo_actions = (array) $actions->foo;918 $this->assertEquals( $expected, array_values( wp_list_pluck( $foo_actions, 'key' ) ) );919 920 buddypress()->activity->actions = $old_actions;921 }922 872 923 873 /**
Note: See TracChangeset
for help on using the changeset viewer.