File tree 2 files changed +17
-0
lines changed
src/Standards/Generic/Tests/Files
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,20 @@ class ExecutableFileUnitTest extends AbstractSniffUnitTest
15
15
{
16
16
17
17
18
+ /**
19
+ * Should this test be skipped for some reason.
20
+ *
21
+ * @return void
22
+ */
23
+ protected function shouldSkipTest ()
24
+ {
25
+ // PEAR doesn't preserve the executable flag, so skip
26
+ // tests when running in a PEAR install.
27
+ return $ GLOBALS ['PHP_CODESNIFFER_PEAR ' ];
28
+
29
+ }//end shouldSkipTest()
30
+
31
+
18
32
/**
19
33
* Returns the lines where errors should occur.
20
34
*
Original file line number Diff line number Diff line change 9
9
10
10
namespace PHP_CodeSniffer \Tests ;
11
11
12
+ $ GLOBALS ['PHP_CODESNIFFER_PEAR ' ] = false ;
13
+
12
14
if (is_file (__DIR__ .'/../autoload.php ' ) === true ) {
13
15
include_once 'Core/AllTests.php ' ;
14
16
include_once 'Standards/AllSniffs.php ' ;
15
17
} else {
16
18
include_once 'CodeSniffer/Core/AllTests.php ' ;
17
19
include_once 'CodeSniffer/Standards/AllSniffs.php ' ;
18
20
include_once 'FileList.php ' ;
21
+ $ GLOBALS ['PHP_CODESNIFFER_PEAR ' ] = true ;
19
22
}
20
23
21
24
// PHPUnit 7 made the TestSuite run() method incompatible with
You can’t perform that action at this time.
0 commit comments