WordPress.org

Making WordPress.org

Ticket #5447: 5447.diff

File 5447.diff, 3.8 KB (added by pfefferle, 15 months ago)
  • wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/single-result.php

    diff --git wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/single-result.php wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/parts/single-result.php
    index fc7b286b7..db765fbc3 100644
    if ( $parent ) : 
    6868        </tr>
    6969</table>
    7070
    71 <?php if ( ! empty( $results['failures'] ) ) : ?>
     71<?php
     72if (
     73        ! empty( $results['failures'] ) ||
     74        ! empty( $results['errors'] )
     75        ) :
     76        ?>
    7277        <h2>Errors/Failures</h2>
    7378
    7479        <?php
  • wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/phpunit-test-reporter.php

    diff --git wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/phpunit-test-reporter.php wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/phpunit-test-reporter.php
    index 1b3d84b5d..5a269ff08 100644
     
    77 * Author URI:      https://make.wordpress.org/hosting/
    88 * Text Domain:     ptr
    99 * Domain Path:     /languages
    10  * Version:         0.1.2
     10 * Version:         0.1.3
    1111 * License:         GPL v3
    1212 *
    1313 * @package         PTR
  • wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/readme.txt

    diff --git wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/readme.txt wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/readme.txt
    index 9911862cb..af13b7476 100644
     
    22Contributors: octalmage, danielbachhuber, wpamitkumar, mikeschroder, pfefferle
    33Tags: phpunit
    44Requires at least: 4.7
    5 Tested up to: 5.4.1
    6 Stable tag: 0.1.2
     5Tested up to: 5.5
     6Stable tag: 0.1.3
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
    99
    Usage: 
    5353  grunt-wp-readme-to-markdown ^2.0.1, and update plugin version in `package.json`.
    5454* Upgrade Docker environment to use `wordpress:5.4.1-php7.4` image.
    5555* Correct contributor list in `readme.txt` and update `README.md`.
     56
     57= 0.1.3 (September 23th, 2020) =
     58* Include errors along with failures on the error report page ([PR](https://github.com/WordPress/phpunit-test-reporter/pull/84)).
     59* Change to `integer` built-in type for `commit` field, following updates in WordPress 5.5.
  • wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php

    diff --git wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php wordpress.org/public_html/wp-content/plugins/phpunit-test-reporter/src/class-restapi.php
    index 4fe985de6..0fb15666f 100644
    class RestAPI { 
    1919                                'callback'            => array( __CLASS__, 'add_results_callback' ),
    2020                                'args'                => array(
    2121                                        'commit'  => array(
    22                                                 'required'          => true,
    23                                                 'description'       => 'The SVN commit changeset number.',
    24                                                 'type'              => 'numeric',
    25                                                 'validate_callback' => array( __CLASS__, 'validate_callback' ),
     22                                                'required'    => true,
     23                                                'description' => 'The SVN commit changeset number.',
     24                                                'type'        => 'integer',
    2625                                        ),
    2726                                        'results' => array(
    2827                                                'required'          => true,
    class RestAPI { 
    5049
    5150        public static function validate_callback( $value, $request, $key ) {
    5251                switch ( $key ) {
    53                         case 'commit':
    54                                 if ( ! is_numeric( $value ) ) {
    55                                         return new WP_Error(
    56                                                 'rest_invalid',
    57                                                 __( 'Value must be numeric.', 'ptr' ),
    58                                                 array(
    59                                                         'status' => 400,
    60                                                 )
    61                                         );
    62                                 }
    63                                 return true;
    6452                        case 'message':
    6553                                if ( empty( $value ) || ! is_string( $value ) ) {
    6654                                        return new WP_Error(