Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/17/2017 06:57:15 PM (2 years ago)
Author:
dcavins
Message:

Change signature of groups_edit_base_group_details().

  • Changes the signature of groups_edit_base_group_details() to accept

a single array instead of several arguments.

  • Adds the capability to update the group slug, with the old slug being

stored as a group meta item.

See #6014.

File:
1 edited

Legend:

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

    r11091 r11555  
    5656    public function test_bp_groups_format_activity_action_group_details_updated_with_no_change() {
    5757        $group = $this->factory->group->create_and_get();
    58         groups_edit_base_group_details( $group->id, $group->name, $group->description, true );
     58        groups_edit_base_group_details( array(
     59                'group_id'       => $group->id,
     60                'name'           => $group->name,
     61                'slug'           => $group->slug,
     62                'description'    => $group->description,
     63                'notify_members' => true,
     64        ) );
    5965
    6066        $a = bp_activity_get( array(
     
    7379    public function test_bp_groups_format_activity_action_group_details_updated_with_notify_members_false() {
    7480        $group = $this->factory->group->create_and_get();
    75         groups_edit_base_group_details( $group->id, 'Foo', $group->description, false );
     81        groups_edit_base_group_details( array(
     82            'group_id'       => $group->id,
     83            'name'           => 'Foo',
     84            'slug'           => $group->slug,
     85            'description'    => $group->description,
     86            'notify_members' => false,
     87        ) );
    7688
    7789        $a = bp_activity_get( array(
     
    94106
    95107        $group = $this->factory->group->create_and_get();
    96         groups_edit_base_group_details( $group->id, 'Foo', $group->description, true );
     108        groups_edit_base_group_details( array(
     109            'group_id'       => $group->id,
     110            'name'           => 'Foo',
     111            'slug'           => $group->slug,
     112            'description'    => $group->description,
     113            'notify_members' => true,
     114        ) );
    97115
    98116        $a = bp_activity_get( array(
     
    120138
    121139        $group = $this->factory->group->create_and_get();
    122         groups_edit_base_group_details( $group->id, $group->name, 'Bar', true );
     140        groups_edit_base_group_details( array(
     141            'group_id'       => $group->id,
     142            'name'           => $group->name,
     143            'slug'           => $group->slug,
     144            'description'    => 'Bar',
     145            'notify_members' => true,
     146        ) );
    123147
    124148        $a = bp_activity_get( array(
     
    146170
    147171        $group = $this->factory->group->create_and_get();
    148         groups_edit_base_group_details( $group->id, 'Foo', 'Bar', true );
     172        groups_edit_base_group_details( array(
     173            'group_id'       => $group->id,
     174            'name'           => 'Foo',
     175            'slug'           => $group->slug,
     176            'description'    => 'Bar',
     177            'notify_members' => true,
     178        ) );
    149179
    150180        $a = bp_activity_get( array(
Note: See TracChangeset for help on using the changeset viewer.