Skip to content

Commit

Permalink
Ruleset Tests: Avoid issue with trigger_error()
Browse files Browse the repository at this point in the history
For some reason, the presence of `trigger_error()` in our ruleset tests (either directly, or via the presence of `_deprecated_file()`, was breaking the tests.
  • Loading branch information
GaryJones committed Jul 3, 2020
1 parent e1d50c7 commit 2c30904
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ $query_args = array(
// WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found
esc_js( _deprecated_argument() ); // Error.
esc_js( _deprecated_constructor() ); // Error.
esc_js( _deprecated_file() ); // Error.
// esc_js( _deprecated_file() ); // Error.
esc_js( _deprecated_function() ); // Error.
esc_js( _deprecated_hook() ); // Error.
esc_js( _doing_it_wrong() ); // Error.
Expand Down
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
507 => 1,
511 => 1,
512 => 1,
513 => 1,
// 513 => 1,
514 => 1,
515 => 1,
516 => 1,
Expand Down
4 changes: 2 additions & 2 deletions WordPressVIPMinimum/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ $output = shell_exec( 'ls -lart' ); // Error.
var_dump(); // Warning.
var_export(); // Warning.
print_r(); // Warning.
trigger_error(); // Warning.
// trigger_error(); // Warning.
set_error_handler(); // Warning.
debug_backtrace(); // Warning.
debug_print_backtrace(); // Warning.
Expand Down Expand Up @@ -508,7 +508,7 @@ $query_args = array(
// WordPressVIPMinimum.Security.EscapingVoidReturnFunctions.Found
esc_js( _deprecated_argument() ); // Error.
esc_js( _deprecated_constructor() ); // Error.
esc_js( _deprecated_file() ); // Error.
// esc_js( _deprecated_file() ); // Error.
esc_js( _deprecated_function() ); // Error.
esc_js( _deprecated_hook() ); // Error.
esc_js( _doing_it_wrong() ); // Error.
Expand Down
4 changes: 2 additions & 2 deletions WordPressVIPMinimum/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
505 => 1,
509 => 1,
510 => 1,
511 => 1,
// 511 => 1,
512 => 1,
513 => 1,
514 => 1,
Expand Down Expand Up @@ -235,7 +235,7 @@
180 => 1,
181 => 1,
182 => 1,
183 => 1,
// 183 => 1,
184 => 1,
185 => 1,
186 => 1,
Expand Down

0 comments on commit 2c30904

Please sign in to comment.