Skip to content

Commit b84ce19

Browse files
committed
Adding integration tests for new sniffs
1 parent f1825e0 commit b84ce19

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ruleset_test.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,8 @@ wp_safe_redirect( 'https.//vip.wordpress.com' ); // NOK. Error.
171171

172172
is_multi_author(); // NOK. Warning.
173173

174-
?>
174+
include( 'non-php-file.svg' ); // NOK. Error. Including non-php file.
175+
176+
echo file_get_contents( 'non-php-file.svg' ); // XSS OK. Preferred way of including SVG/CSS file.
175177

178+
?>

ruleset_test.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
157 => 1,
5151
166 => 1,
5252
170 => 1,
53-
174 => 1, // Error on the end of the file. When any code is added, bounce this.
53+
174 => 1,
54+
178 => 1, // Error on the end of the file. When any code is added, bounce this.
5455
),
5556
'warnings' => array(
5657
9 => 1,

0 commit comments

Comments
 (0)