[buddypress-trac] [BuddyPress Trac] #5834: Notice while activating a member (with no role on any blogs) on a multisite config
buddypress-trac
noreply at wordpress.org
Tue Aug 26 23:01:13 UTC 2014
#5834: Notice while activating a member (with no role on any blogs) on a multisite
config
--------------------------+-----------------------
Reporter: imath | Owner: imath
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.1
Component: Blogs | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------
Changes (by boonebgorges):
* keywords: 2nd-opinion =>
Comment:
> and in WP_UnitTest_Factory_For_Blog it sets testpath1 for the first blog
without taking in account the signup 'path' attribute. But for the 3rd
blog it's taking in account the path attribute of the signup ?!?
I don't really follow this. Where in your BP_Signup tests are you actually
creating blogs? And why would that blog creation happen with
WP_UnitTest_Factory_For_Blog?
Worst case scenario, you should go back to the drawing board and make your
test smaller. You're running a big long test with signups. The bug here,
however, is in `bp_blogs_add_user_to_blog()` Write the smallest possible
test that demonstrates the error:
{{{
$u = $this->factory->user->create();
$b = $this->factory->blog->create();
$result = bp_blogs_add_user_to_blog( $u, $b );
$this->assertSame( null, $result );
}}}
This test kinda stinks because bp_blogs_add_user_to_blog() doesn't return
any value on success, but that's an item for a separate ticket. The point
is that this tests something much closer to the problem, and skirts your
signup issue.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5834#comment:18>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list