diff --git tests/phpunit/testcases/members/class-bp-signup.php tests/phpunit/testcases/members/class-bp-signup.php
index 18ab33f..e194e2e 100644
|
|
|
class BP_Tests_BP_Signup extends BP_UnitTestCase {
|
| 251 | 251 | * @group activate |
| 252 | 252 | */ |
| 253 | 253 | public function test_activate_user_accounts_with_blogs() { |
| 254 | | global $wpdb, $current_site; |
| | 254 | global $wpdb, $current_site, $base; |
| 255 | 255 | |
| 256 | 256 | if ( ! is_multisite() ) { |
| 257 | 257 | return; |
| … |
… |
class BP_Tests_BP_Signup extends BP_UnitTestCase {
|
| 259 | 259 | |
| 260 | 260 | $signups = array(); |
| 261 | 261 | |
| 262 | | $signups['blogone'] = $this->factory->signup->create( array( |
| 263 | | 'user_login' => 'blogone', |
| | 262 | // Can't trust this first signup :( |
| | 263 | $signups['testpath1'] = $this->factory->signup->create( array( |
| | 264 | 'user_login' => 'testpath1', |
| 264 | 265 | 'user_email' => 'blogone@example.com', |
| 265 | | 'domain' => $current_site->domain, |
| 266 | | 'path' => '/blogone/', |
| 267 | | 'title' => 'Blog One', |
| | 266 | 'domain' => '', |
| | 267 | 'path' => '', |
| | 268 | 'title' => '', |
| 268 | 269 | 'activation_key' => 'activationkeyblogone', |
| 269 | 270 | ) ); |
| 270 | 271 | |
| 271 | 272 | $signups['blogtwo'] = $this->factory->signup->create( array( |
| 272 | 273 | 'user_login' => 'blogtwo', |
| 273 | 274 | 'user_email' => 'blogtwo@example.com', |
| 274 | | 'domain' => '', |
| 275 | | 'path' => '', |
| 276 | | 'title' => '', |
| | 275 | 'domain' => $current_site->domain, |
| | 276 | 'path' => $base . 'blogtwo', |
| | 277 | 'title' => 'Blog Two', |
| 277 | 278 | 'activation_key' => 'activationkeyblogtwo', |
| 278 | 279 | ) ); |
| 279 | 280 | |
| 280 | 281 | $signups['blogthree'] = $this->factory->signup->create( array( |
| 281 | 282 | 'user_login' => 'blogthree', |
| 282 | 283 | 'user_email' => 'blogthree@example.com', |
| 283 | | 'domain' => $current_site->domain, |
| 284 | | 'path' => '/blogthree/', |
| 285 | | 'title' => 'Blog Three', |
| | 284 | 'domain' => '', |
| | 285 | 'path' => '', |
| | 286 | 'title' => '', |
| 286 | 287 | 'activation_key' => 'activationkeyblogthree', |
| 287 | 288 | ) ); |
| 288 | 289 | |
| | 290 | $signups['blogfour'] = $this->factory->signup->create( array( |
| | 291 | 'user_login' => 'blogfour', |
| | 292 | 'user_email' => 'blogfour@example.com', |
| | 293 | 'domain' => $current_site->domain, |
| | 294 | 'path' => $base . 'blogfour', |
| | 295 | 'title' => 'Blog Four', |
| | 296 | 'activation_key' => 'activationkeyblogfour', |
| | 297 | ) ); |
| | 298 | |
| 289 | 299 | // Neutralize db errors |
| 290 | 300 | $suppress = $wpdb->suppress_errors(); |
| 291 | 301 | |
| … |
… |
class BP_Tests_BP_Signup extends BP_UnitTestCase {
|
| 306 | 316 | $blogs = array(); |
| 307 | 317 | |
| 308 | 318 | foreach ( $users as $path => $user ) { |
| | 319 | // Can't trust this first signup :( |
| | 320 | if ( 'testpath1' == $path ) { |
| | 321 | continue; |
| | 322 | } |
| | 323 | |
| 309 | 324 | $blogs[ $path ] = get_active_blog_for_user( $user->ID ); |
| 310 | 325 | } |
| 311 | 326 | |