Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/21/2021 08:10:55 PM (3 years ago)
Author:
imath
Message:

The new_avatar activity belongs to the Members component

The activity generated when members add/update their profile photo wasn't migrated to the Members component during the 6.0.0 milestone. This commit's goal is to repare this oversight.

See #8156
See #8407
Fixes #8408

File:
1 edited

Legend:

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

    r11737 r12851  
    2020
    2121        $expected = sprintf( __( '%s became a registered member', 'buddypress' ), bp_core_get_userlink( $u ) );
     22
     23        $a_obj = new BP_Activity_Activity( $a );
     24
     25        $this->assertSame( $expected, $a_obj->action );
     26    }
     27
     28    /**
     29     * @group activity_action
     30     * @group bp_members_format_activity_action_new_avatar
     31     */
     32    public function test_bp_members_format_activity_action_new_avatar() {
     33        $u = self::factory()->user->create();
     34        $a = self::factory()->activity->create( array(
     35            'component' => 'members',
     36            'type' => 'new_avatar',
     37            'user_id' => $u,
     38        ) );
     39
     40        $expected = sprintf( __( '%s changed their profile picture', 'buddypress' ), bp_core_get_userlink( $u ) );
    2241
    2342        $a_obj = new BP_Activity_Activity( $a );
Note: See TracChangeset for help on using the changeset viewer.