Making WordPress.org


Ignore:
Timestamp:
07/13/2022 03:15:45 AM (4 years ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@34992591d62901638ad5adc590b03a25272c2df4

File:
1 edited

Legend:

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

    r11833 r11961  
    66 * Make sure that any modifications are hardcoded to only affect test sites and test user accounts.
    77 *
    8  * usage: wp eval-file e2e.php test_name
     8 * Usage: wp eval-file e2e.php test_name
    99 */
    1010
     
    1313use Exception, WP_User, WP_Post;
    1414
    15 ini_set( 'display_errors', 'On' ); // won't do anything if fatal errors
     15// won't do anything if fatal errors
     16ini_set( 'display_errors', 'On' ); //phpcs:ignore
    1617
    1718if ( 'staging' !== wp_get_environment_type() || 'cli' !== php_sapi_name() ) {
     
    2526main( $args[0] );
    2627
     28/**
     29 * @param Case $case
     30 *
     31 * @return void
     32 */
    2733function main( $case ) {
    2834    switch_to_blog( 7 ); // learn.w.org
     
    3541
    3642    } catch ( Exception $exception ) {
    37         echo $exception->getMessage();
     43        echo $exception->getMessage(); //phpcs:ignore
    3844
    3945    } finally {
     
    4248}
    4349
     50/**
     51 *
     52 * @param WP_User $user
     53 * @param WP_Post $course
     54 *
     55 * @return void
     56 */
    4457function test_add( WP_User $user, WP_Post $course ) {
    4558    Learn_Profiles\add_course_completed_activity( 'complete', $user->ID, $course->ID );
    4659
    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
    4861}
Note: See TracChangeset for help on using the changeset viewer.