Skip to:
Content

BuddyPress.org

Changeset 8966


Ignore:
Timestamp:
08/26/2014 11:20:57 PM (12 years ago)
Author:
imath
Message:

Edit the unit test test_activate_user_accounts_with_blogs()

Make sure the test is working while running all tests and only BP_Signup tests

Fixes #5834

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/class-bp-signup.php

    r8965 r8966  
    252252         */
    253253        public function test_activate_user_accounts_with_blogs() {
    254                 global $wpdb, $current_site;
     254                global $wpdb, $current_site, $base;
    255255
    256256                if ( ! is_multisite() ) {
     
    260260                $signups = array();
    261261
    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',
    264265                        'user_email'     => 'blogone@example.com',
    265                         'domain'         => $current_site->domain,
    266                         'path'           => '/blogone/',
    267                         'title'          => 'Blog One',
     266                        'domain'         => '',
     267                        'path'           => '',
     268                        'title'          => '',
    268269                        'activation_key' => 'activationkeyblogone',
    269270                ) );
     
    272273                        'user_login'     => 'blogtwo',
    273274                        'user_email'     => 'blogtwo@example.com',
     275                        'domain'         => $current_site->domain,
     276                        'path'           => $base . 'blogtwo',
     277                        'title'          => 'Blog Two',
     278                        'activation_key' => 'activationkeyblogtwo',
     279                ) );
     280
     281                $signups['blogthree'] = $this->factory->signup->create( array(
     282                        'user_login'     => 'blogthree',
     283                        'user_email'     => 'blogthree@example.com',
    274284                        'domain'         => '',
    275285                        'path'           => '',
    276286                        'title'          => '',
    277                         'activation_key' => 'activationkeyblogtwo',
    278                 ) );
    279 
    280                 $signups['blogthree'] = $this->factory->signup->create( array(
    281                         'user_login'     => 'blogthree',
    282                         'user_email'     => 'blogthree@example.com',
     287                        'activation_key' => 'activationkeyblogthree',
     288                ) );
     289
     290                $signups['blogfour'] = $this->factory->signup->create( array(
     291                        'user_login'     => 'blogfour',
     292                        'user_email'     => 'blogfour@example.com',
    283293                        'domain'         => $current_site->domain,
    284                         'path'           => '/blogthree/',
    285                         'title'          => 'Blog Three',
    286                         'activation_key' => 'activationkeyblogthree',
     294                        'path'           => $base . 'blogfour',
     295                        'title'          => 'Blog Four',
     296                        'activation_key' => 'activationkeyblogfour',
    287297                ) );
    288298
     
    307317
    308318                foreach ( $users as $path => $user  ) {
     319                        // Can't trust this first signup :(
     320                        if ( 'testpath1' == $path ) {
     321                                continue;
     322                        }
     323
    309324                        $blogs[ $path ] = get_active_blog_for_user( $user->ID );
    310325                }
Note: See TracChangeset for help on using the changeset viewer.