Skip to content

Commit 65e88a3

Browse files
committed
Merge branch 'feature/generic-executablefile-skip-tests-on-windows' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 1918934 + 9df8ae1 commit 65e88a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function shouldSkipTest()
2424
{
2525
// PEAR doesn't preserve the executable flag, so skip
2626
// tests when running in a PEAR install.
27-
return $GLOBALS['PHP_CODESNIFFER_PEAR'];
27+
// Also skip on Windows which doesn't have the concept of executable files.
28+
return ($GLOBALS['PHP_CODESNIFFER_PEAR'] || (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'));
2829

2930
}//end shouldSkipTest()
3031

0 commit comments

Comments
 (0)