Skip to content

Commit

Permalink
Remove exclusion for the PrefixAllGlobals sniff after changes to `b…
Browse files Browse the repository at this point in the history
…ootstrap.php`
  • Loading branch information
enricobattocchi committed Sep 28, 2023
1 parent 4111485 commit 4c62e97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 0 additions & 5 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@

<!-- TEST CODE -->

<!-- Valid usage: For testing purposes, some non-prefixed globals are being created, which is fine. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<exclude-pattern>/tests/*/bootstrap\.php$</exclude-pattern>
</rule>

<!-- Valid usage: For testing purposes, some non-prefixed global constants are being created, which is fine. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound">
<exclude-pattern>/tests/*\.php$</exclude-pattern>
Expand Down
4 changes: 1 addition & 3 deletions tests/wp/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
*/
require_once dirname( __DIR__, 2 ) . '/vendor/yoast/wp-test-utils/src/WPIntegration/bootstrap-functions.php';

$_wp_tests_dir = WPIntegration\get_path_to_wp_test_dir();

// Get access to tests_add_filter() function.
require_once $_wp_tests_dir . 'includes/functions.php';
require_once WPIntegration\get_path_to_wp_test_dir() . 'includes/functions.php';

tests_add_filter(
'muplugins_loaded',
Expand Down

0 comments on commit 4c62e97

Please sign in to comment.