Skip to content

Commit 932dd3a

Browse files
committed
Fix integration tests
Closing PHP Tag is not being reported in case inline HTML is found. We might need to introduce a custom sniff for this.
1 parent b84ce19 commit 932dd3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ruleset_test.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ is_multi_author(); // NOK. Warning.
173173

174174
include( 'non-php-file.svg' ); // NOK. Error. Including non-php file.
175175

176-
echo file_get_contents( 'non-php-file.svg' ); // XSS OK. Preferred way of including SVG/CSS file.
176+
echo file_get_contents( 'non-php-file.svg' ); // XSS OK. Preferred way of including SVG/CSS file. WP_Filesystem Warning.
177177

178-
?>
178+
?> <!-- closing PHP tag should be omitted -->

ruleset_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
166 => 1,
5252
170 => 1,
5353
174 => 1,
54-
178 => 1, // Error on the end of the file. When any code is added, bounce this.
5554
),
5655
'warnings' => array(
5756
9 => 1,
@@ -77,6 +76,7 @@
7776
164 => 1,
7877
168 => 1,
7978
172 => 1,
79+
176 => 1,
8080
),
8181
'messages' => array(
8282
129 => array(

0 commit comments

Comments
 (0)