Skip to:
Content

BuddyPress.org

Changeset 9156


Ignore:
Timestamp:
11/21/2014 05:53:06 PM (7 years ago)
Author:
imath
Message:

Unit tests: make sure the user is a member of the group before promoting him

WordPress changeset 30400 introduced STRICT_ALL_TABLES in WPDB and revealed a trouble in BP_Tests_Group_Cache->test_groups_get_group_admins_cache. As the user was directly promoted as an admin of the group without being first added as a member, a WordPress database error was making this test fail.
The ticket will remain open in case we find some other notices errors when we use WPDB.

See #6036

File:
1 edited

Legend:

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

    r9139 r9156  
    164164        $g = $this->factory->group->create( array( 'creator_id' => $u1 ) );
    165165
     166        // User 2 joins the group
     167        groups_join_group( $g, $u2 );
     168
    166169        // prime cache
    167170        groups_get_group_admins( $g );
Note: See TracChangeset for help on using the changeset viewer.