Making WordPress.org

Changeset 11938


Ignore:
Timestamp:
07/05/2022 09:00:25 PM (3 years ago)
Author:
iandunn
Message:

GP Profiles: Add test for bulk approval

File:
1 edited

Legend:

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

    r11937 r11938  
    1111
    1212use WordPressdotorg\GlotPress\Profiles as GlotPress_Profiles;
    13 use Exception, WP_User, GP_Translation;
     13use Exception, WP_User, GP_Translation, GP_Translation_Set, GP_Project, GP_Locale;
    1414
    1515ini_set( 'display_errors', 'On' ); // won't do anything if fatal errors
     
    5555    echo "\nThe daily digest count should have been bumped on https://profiles.wordpress.org/$user->user_nicename/ \n";
    5656}
     57
     58function test_bulk_approve( WP_User $user ) {
     59    $bulk = array(
     60        'action'  => 'approve',
     61        'row-ids' => array( '541-33', '542-34' ),
     62    );
     63    GlotPress_Profiles\add_bulk_translation_activity( new GP_Project(), new GP_Locale(), new GP_Translation_Set(), $bulk );
     64
     65    echo "\nThe daily digest count should have been bumped on https://profiles.wordpress.org/$user->user_nicename/ \n";
     66}
Note: See TracChangeset for help on using the changeset viewer.