Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/09/2013 02:11:52 PM (13 years ago)
Author:
boonebgorges
Message:

In test suite, factory->activity->create() should return an id, not an object

Two reasons: The value that's almost always needed is an ID, and it's more
consistent with WP's factories.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/routing/activity.php

    r7039 r7047  
    2828         */
    2929        function test_activity_permalink() {
    30                 $activity = $this->factory->activity->create();
     30                $a = $this->factory->activity->create();
     31                $activity = $this->factory->activity->get_object_by_id( $a );
    3132
    3233                $url = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
Note: See TracChangeset for help on using the changeset viewer.