Changeset 5806
- Timestamp:
- 08/16/2017 01:10:07 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/result-set.php
r5805 r5806 8 8 <tr> 9 9 <th style="width:100px">Revision</th> 10 <th style="width:100px">Status</th>11 10 <th>Host</th> 12 11 <th>PHP Version</th> … … 17 16 <tbody> 18 17 <?php 19 $total_cols = 6;18 $total_cols = 5; 20 19 foreach ( $revisions as $revision ) : 21 20 $rev_id = (int) ltrim( $revision->post_name, 'r' ); … … 50 49 ?> 51 50 <tr> 52 <td></td> 53 <td><a href="<?php echo esc_url( get_permalink( $report->ID ) ); ?>" title="<?php echo esc_attr( $status_title ); ?>" class="<?php echo esc_attr( 'ptr-status-badge ptr-status-badge-' . strtolower( $status ) ); ?>"><?php echo esc_html( $status ); ?></a></td> 51 <td><a href="<?php echo esc_url( get_permalink( $report->ID ) ); ?>" title="<?php echo esc_attr( $status_title ); ?>" class="<?php echo esc_attr( 'ptr-status-badge ptr-status-badge-' . strtolower( $status ) ); ?>"><?php echo esc_html( $status ); ?></a> 52 <?php 53 $display_time = Display::get_display_time( $report->ID ); 54 if ( $display_time ) : 55 ?> 56 <br /><small><?php echo esc_html( $display_time ); ?></small> 57 <?php endif; ?> 58 </td> 54 59 <td><?php echo esc_html( $host ); ?></td> 55 60 <td><?php echo esc_html( Display::get_display_php_version( $report->ID ) ); ?></td> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/single-result.php
r5805 r5806 24 24 <?php endif; ?> 25 25 26 <p><a href="<?php echo esc_url( get_permalink( $report->ID ) ); ?>" title="<?php echo esc_attr( $status_title ); ?>" class="<?php echo esc_attr( 'ptr-status-badge ptr-status-badge-' . strtolower( $status ) ); ?>"><?php echo esc_html( $status ); ?></a></p> 26 <p><a href="<?php echo esc_url( get_permalink( $report->ID ) ); ?>" title="<?php echo esc_attr( $status_title ); ?>" class="<?php echo esc_attr( 'ptr-status-badge ptr-status-badge-' . strtolower( $status ) ); ?>"><?php echo esc_html( $status ); ?></a> 27 <?php 28 $display_time = Display::get_display_time( $report->ID ); 29 if ( $display_time ) : 30 ?> 31 <br /><small><?php echo esc_html( $display_time ); ?></small> 32 <?php endif; ?> 33 </p> 27 34 28 35 <h2>Environment</h2> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-content-model.php
r5805 r5806 17 17 ), 18 18 'public' => true, 19 'has_archive' => true,19 'has_archive' => false, 20 20 'show_in_rest' => true, 21 21 'hierarchical' => true, 22 'rewrite' => array( 23 'slug' => 'test-results', 24 ), 22 25 'supports' => array( 23 26 'title', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-display.php
r5805 r5806 42 42 ), 43 43 ) ); 44 $content = '<p><a href="' . esc_url( home_url( 'test-results/' ) ) . '">← Test Results</a></p>' . PHP_EOL . PHP_EOL . $content; 44 45 } 45 46 … … 122 123 <?php 123 124 return ob_get_clean(); 125 } 126 127 /** 128 * Get the time for display 129 * 130 * @return string 131 */ 132 public static function get_display_time( $report_id ) { 133 $results = get_post_meta( $report_id, 'results', true ); 134 if ( empty( $results['time'] ) ) { 135 return ''; 136 } 137 $minutes = floor( ( (int) $results['time'] / 60 ) % 60 ); 138 $seconds = (int) $results['time'] % 60; 139 return "{$minutes}m {$seconds}s"; 124 140 } 125 141
Note: See TracChangeset
for help on using the changeset viewer.