|
@@ 261-270 (lines=10) @@
|
| 258 |
|
* |
| 259 |
|
* @return array Test results. |
| 260 |
|
*/ |
| 261 |
|
public static function passing_test( $args ) { |
| 262 |
|
$defaults = self::test_result_defaults(); |
| 263 |
|
$defaults['short_description'] = __( 'Test passed!', 'jetpack' ); |
| 264 |
|
|
| 265 |
|
$args = wp_parse_args( $args, $defaults ); |
| 266 |
|
|
| 267 |
|
$args['pass'] = true; |
| 268 |
|
|
| 269 |
|
return $args; |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
/** |
| 273 |
|
* Helper function to return consistent responses for a skipped test. |
|
@@ 344-354 (lines=11) @@
|
| 341 |
|
* |
| 342 |
|
* @return array Test results. |
| 343 |
|
*/ |
| 344 |
|
public static function failing_test( $args ) { |
| 345 |
|
$defaults = self::test_result_defaults(); |
| 346 |
|
$defaults['short_description'] = __( 'Test failed!', 'jetpack' ); |
| 347 |
|
$defaults['severity'] = 'critical'; |
| 348 |
|
|
| 349 |
|
$args = wp_parse_args( $args, $defaults ); |
| 350 |
|
|
| 351 |
|
$args['pass'] = false; |
| 352 |
|
|
| 353 |
|
return $args; |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
/** |
| 357 |
|
* Provides defaults for test arguments. |