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 ) : |
| 68 | 68 | </tr> |
| 69 | 69 | </table> |
| 70 | 70 | |
| 71 | | <?php if ( ! empty( $results['failures'] ) ) : ?> |
| | 71 | <?php |
| | 72 | if ( |
| | 73 | ! empty( $results['failures'] ) || |
| | 74 | ! empty( $results['errors'] ) |
| | 75 | ) : |
| | 76 | ?> |
| 72 | 77 | <h2>Errors/Failures</h2> |
| 73 | 78 | |
| 74 | 79 | <?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
|
|
|
|
| 7 | 7 | * Author URI: https://make.wordpress.org/hosting/ |
| 8 | 8 | * Text Domain: ptr |
| 9 | 9 | * Domain Path: /languages |
| 10 | | * Version: 0.1.2 |
| | 10 | * Version: 0.1.3 |
| 11 | 11 | * License: GPL v3 |
| 12 | 12 | * |
| 13 | 13 | * @package PTR |
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
|
|
|
|
| 2 | 2 | Contributors: octalmage, danielbachhuber, wpamitkumar, mikeschroder, pfefferle |
| 3 | 3 | Tags: phpunit |
| 4 | 4 | Requires at least: 4.7 |
| 5 | | Tested up to: 5.4.1 |
| 6 | | Stable tag: 0.1.2 |
| | 5 | Tested up to: 5.5 |
| | 6 | Stable tag: 0.1.3 |
| 7 | 7 | License: GPLv3 |
| 8 | 8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html |
| 9 | 9 | |
| … |
… |
Usage: |
| 53 | 53 | grunt-wp-readme-to-markdown ^2.0.1, and update plugin version in `package.json`. |
| 54 | 54 | * Upgrade Docker environment to use `wordpress:5.4.1-php7.4` image. |
| 55 | 55 | * 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. |
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 { |
| 19 | 19 | 'callback' => array( __CLASS__, 'add_results_callback' ), |
| 20 | 20 | 'args' => array( |
| 21 | 21 | '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', |
| 26 | 25 | ), |
| 27 | 26 | 'results' => array( |
| 28 | 27 | 'required' => true, |
| … |
… |
class RestAPI { |
| 50 | 49 | |
| 51 | 50 | public static function validate_callback( $value, $request, $key ) { |
| 52 | 51 | 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; |
| 64 | 52 | case 'message': |
| 65 | 53 | if ( empty( $value ) || ! is_string( $value ) ) { |
| 66 | 54 | return new WP_Error( |