Making WordPress.org


Ignore:
Timestamp:
05/24/2018 09:16:48 PM (6 years ago)
Author:
danielbachhuber
Message:

phpunit-test-reporter: Only report result status when tests were actually run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/result-set.php

    r6523 r7227  
    3636                    $status_title = 'No results found for test.';
    3737                    $results      = get_post_meta( $report->ID, 'results', true );
    38                     if ( isset( $results['failures'] ) ) {
     38                    if ( isset( $results['failures'] ) && ! empty( $results['tests'] ) ) {
    3939                        $status       = 0 === (int) $results['failures'] && 0 === (int) $results['errors'] ? 'Passed' : 'Failed';
    4040                        $status_title = (int) $results['tests'] . ' tests, ' . (int) $results['failures'] . ' failed, ' . (int) $results['errors'] . ' errors';
Note: See TracChangeset for help on using the changeset viewer.