Changeset 11961 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/tests/e2e.php
- Timestamp:
- 07/13/2022 03:15:45 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/tests/e2e.php
r11833 r11961 6 6 * Make sure that any modifications are hardcoded to only affect test sites and test user accounts. 7 7 * 8 * usage: wp eval-file e2e.php test_name8 * Usage: wp eval-file e2e.php test_name 9 9 */ 10 10 … … 13 13 use Exception, WP_User, WP_Post; 14 14 15 ini_set( 'display_errors', 'On' ); // won't do anything if fatal errors 15 // won't do anything if fatal errors 16 ini_set( 'display_errors', 'On' ); //phpcs:ignore 16 17 17 18 if ( 'staging' !== wp_get_environment_type() || 'cli' !== php_sapi_name() ) { … … 25 26 main( $args[0] ); 26 27 28 /** 29 * @param Case $case 30 * 31 * @return void 32 */ 27 33 function main( $case ) { 28 34 switch_to_blog( 7 ); // learn.w.org … … 35 41 36 42 } catch ( Exception $exception ) { 37 echo $exception->getMessage(); 43 echo $exception->getMessage(); //phpcs:ignore 38 44 39 45 } finally { … … 42 48 } 43 49 50 /** 51 * 52 * @param WP_User $user 53 * @param WP_Post $course 54 * 55 * @return void 56 */ 44 57 function test_add( WP_User $user, WP_Post $course ) { 45 58 Learn_Profiles\add_course_completed_activity( 'complete', $user->ID, $course->ID ); 46 59 47 echo "\nThere should be a course confirmation activity on https://profiles.wordpress.org/$user->user_nicename/ \n"; 60 echo "\nThere should be a course confirmation activity on https://profiles.wordpress.org/$user->user_nicename/ \n"; //phpcs:ignore 48 61 }
Note: See TracChangeset
for help on using the changeset viewer.