Making WordPress.org

Changeset 12019


Ignore:
Timestamp:
08/12/2022 09:13:53 PM (3 years ago)
Author:
iandunn
Message:

Profiles: Use multiple post IDs when testing for reliability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-profiles-wp-activity-notifier/tests/e2e.php

    r12018 r12019  
    7777    wp_set_current_user( $user->ID );
    7878
     79    // Use a different post each time to ensure all posts grouped into the same activity entry.
     80    $handbook_ids = array( 1849, 1611, 1486, 1128, 1734, 1077 );
     81    $handbook_id  = $handbook_ids[ array_rand( $handbook_ids, 1 ) ];
     82
    7983    // This should notify.
    80     $handbook = get_post( 1849 );
    81     $notifier->maybe_notify_updated_post( $handbook->ID, $handbook, $handbook );
    82 
     84    $handbook = get_post( $handbook_id );
     85    $notifier->maybe_notify_updated_post( $handbook_id, $handbook, $handbook );
    8386    sleep( 1 ); // buddypress doesn't show activity that happens at the exact same time.
    8487
Note: See TracChangeset for help on using the changeset viewer.