Skip to content

Commit 8f9bacc

Browse files
committed
Add variation for the tests used to safeguard that the sniff does not incorrectly ignore class methods/constants with the same name as WordPress global functions/constants when used in file_get_contents()
1 parent a787feb commit 8f9bacc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

WordPress/Tests/WP/AlternativeFunctionsUnitTest.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ file_get_contents(namespace\ABSPATH . 'wp-admin/css/some-file.css');
177177
* name as WordPress global functions/constants when used in file_get_contents().
178178
*/
179179
file_get_contents(MyClass::wp_upload_dir() . 'subdir/file.inc');
180-
file_get_contents($this->wp_upload_dir() . 'subdir/file.inc');
181-
file_get_contents($this?->wp_upload_dir() . 'subdir/file.inc');
180+
file_get_contents($this->GET_HOME_PATH() . 'subdir/file.inc');
181+
file_get_contents($this?->plugin_dir_path() . 'subdir/file.inc');
182182
file_get_contents(MyClass::ABSPATH . 'subdir/file.inc');
183-
file_get_contents($this->ABSPATH . 'subdir/file.inc');
184-
file_get_contents($this?->ABSPATH . 'subdir/file.inc');
183+
file_get_contents($this->WPMU_PLUGIN_DIR . 'subdir/file.inc');
184+
file_get_contents($this?->TEMPLATEPATH . 'subdir/file.inc');

0 commit comments

Comments
 (0)