Skip to content

Commit 51d4c20

Browse files
committed
Ignore security checks for tests
1 parent ca633b7 commit 51d4c20

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

phpcs.xml.dist

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@
2222
<exclude-pattern>tests/providers/*.php</exclude-pattern>
2323
</rule>
2424

25+
<!-- disable input validation on tests -->
26+
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotValidated">
27+
<exclude-pattern>tests/*.php</exclude-pattern>
28+
<exclude-pattern>tests/providers/*.php</exclude-pattern>
29+
</rule>
30+
31+
<!-- disable cache constraints on tests -->
32+
<rule ref="WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE">
33+
<exclude-pattern>tests/*.php</exclude-pattern>
34+
<exclude-pattern>tests/providers/*.php</exclude-pattern>
35+
</rule>
36+
37+
<!-- disable input sanitization on tests -->
38+
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
39+
<exclude-pattern>tests/*.php</exclude-pattern>
40+
<exclude-pattern>tests/providers/*.php</exclude-pattern>
41+
</rule>
42+
2543
<exclude-pattern>*/wordpress/*</exclude-pattern>
2644
<exclude-pattern>*/dist/*</exclude-pattern>
2745
<exclude-pattern>*/includes/*</exclude-pattern>

0 commit comments

Comments
 (0)