Skip to content

Commit

Permalink
PrefixAllGlobals: rename test case file directory
Browse files Browse the repository at this point in the history
The test case file subdirectory was named based on a subdirectory of the FileName sniff unit tests.

Naming the test case file subdirectory after the sniff will:
1. Make the files more intuitive to find and associate with the correct sniff;
2. Allows more easily for adding a similar subdirectory structure for the unit tests of another sniff in this category in the future, if so needed.
  • Loading branch information
jrfnl committed May 10, 2019
1 parent bae3401 commit bff6337
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Dummy file. The real test files are in the PrefixAllGlobalsTests subfolder.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PrefixAllGlobalsUnitTest extends AbstractSniffUnitTest {
*/
protected function getTestFiles( $testFileBase ) {
$sep = \DIRECTORY_SEPARATOR;
$test_files = glob( dirname( $testFileBase ) . $sep . 'ThemeTemplatesException{' . $sep . ',' . $sep . '*' . $sep . '}*.inc', \GLOB_BRACE );
$test_files = glob( dirname( $testFileBase ) . $sep . 'PrefixAllGlobalsTests{' . $sep . ',' . $sep . '*' . $sep . '}*.inc', \GLOB_BRACE );

if ( ! empty( $test_files ) ) {
return $test_files;
Expand Down

0 comments on commit bff6337

Please sign in to comment.