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/single-result.php

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