Making WordPress.org


Ignore:
Timestamp:
04/28/2020 04:36:39 PM (5 years ago)
Author:
iandunn
Message:

Events: Tighten test output for better readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/tests/test-index.php

    r9753 r9785  
    5454    }
    5555
    56     printf(
    57         "\n* %s: %s",
    58         $case_id,
    59         $passed ? 'PASSED' : '_FAILED_'
    60     );
     56    echo "\n\n* $case_id: _FAILED_";
    6157
    6258    if ( ! $passed ) {
     
    105101    $cases  = get_location_test_cases();
    106102
    107     printf( "\nRunning %d location tests\n", count( $cases ) );
     103    printf( "\nRunning %d location tests", count( $cases ) );
    108104
    109105    foreach ( $cases as $case_id => $case ) {
     
    920916    $cases  = get_events_test_cases();
    921917
    922     printf( "\n\nRunning %d events tests\n", count( $cases ) );
     918    printf( "\nRunning %d events tests", count( $cases ) );
    923919
    924920    foreach ( $cases as $case_id => $case ) {
     
    987983    $cases  = get_events_country_restriction_test_cases();
    988984
    989     printf( "\n\nRunning %d events restrict by country tests\n", count( $cases ) );
     985    printf( "\nRunning %d events restrict by country tests", count( $cases ) );
    990986
    991987    foreach ( $cases as $case_id => $case ) {
     
    10641060    $cases  = build_response_test_cases();
    10651061
    1066     printf( "\n\nRunning %d build_response() tests\n", count( $cases ) );
     1062    printf( "\nRunning %d build_response() tests", count( $cases ) );
    10671063
    10681064    foreach ( $cases as $case_id => $case ) {
     
    11731169    );
    11741170
    1175     printf( "\n\nRunning %d is_client_core() tests\n", count( $cases ) );
     1171    printf( "\nRunning %d is_client_core() tests", count( $cases ) );
    11761172
    11771173    foreach ( $cases as $user_agent => $expected_result ) {
     
    12571253    }
    12581254
    1259     printf( "\n\nRunning %d add_regional_wordcamps() tests\n", 13 );
     1255    printf( "\nRunning %d add_regional_wordcamps() tests", 13 );
    12601256
    12611257    $tests_expect_no_changes = array();
     
    14231419    $time_during_date_range = 1525887832;
    14241420
    1425     printf( "\n\nRunning %d maybe_add_wp15_promo() tests\n", 4 );
     1421    printf( "\nRunning %d maybe_add_wp15_promo() tests", 4 );
    14261422
    14271423    // Test that the promo is added if there is not already a WP15 event.
     
    14751471    );
    14761472
    1477     printf( "\n\nRunning %d get_iso_3166_2_country_codes() tests\n", count( $cases ) );
     1473    printf( "\nRunning %d get_iso_3166_2_country_codes() tests", count( $cases ) );
    14781474
    14791475    foreach ( $cases as $continent => $sample_country ) {
     
    15141510    );
    15151511
    1516     printf( "\n\nRunning 1 remove_duplicate_events() test\n" );
     1512    printf( "\nRunning 1 remove_duplicate_events() test" );
    15171513
    15181514    $expected_result = array(
Note: See TracChangeset for help on using the changeset viewer.