Skip to:
Content

BuddyPress.org

Ticket #7709: 7709.01.patch

File 7709.01.patch, 1.1 KB (added by r-a-y, 7 years ago)
  • tests/phpunit/testcases/core/functions/bpCoreGetDirectoryPageIds.php

    diff --git tests/phpunit/testcases/core/functions/bpCoreGetDirectoryPageIds.php tests/phpunit/testcases/core/functions/bpCoreGetDirectoryPageIds.php
    index d0860c23..8cd1f347 100644
    class BP_Tests_Core_Functions_BpCoreGetDirectoryPageIds extends BP_UnitTestCase 
    265265                $u = self::factory()->user->create();
    266266                $b1 = self::factory()->blog->create( array( 'user_id' => $u ) );
    267267
    268                 // switch to blog and create some dummy posts until we reach a post ID that
    269                 // matches our BP activity page ID
     268                // Switch to blog and create a post with the same BP activity page ID.
    270269                switch_to_blog( $b1 );
    271                 $p = self::factory()->post->create();
    272                 while( $p <= $dir_pages->activity->id ) {
    273                         $p = self::factory()->post->create();
    274                 }
     270                $p = self::factory()->post->create( array(
     271                        'import_id' => $dir_pages->activity->id
     272                ) );
    275273
    276274                // delete the post that matches the BP activity page ID on this sub-site
    277275                wp_delete_post( $dir_pages->activity->id, true );