Skip to content

Commit

Permalink
Merge branch 'feature/generic-executablefile-skip-tests-on-windows' of
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jan 5, 2020
2 parents 1918934 + 9df8ae1 commit 65e88a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Standards/Generic/Tests/Files/ExecutableFileUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ protected function shouldSkipTest()
{
// PEAR doesn't preserve the executable flag, so skip
// tests when running in a PEAR install.
return $GLOBALS['PHP_CODESNIFFER_PEAR'];
// Also skip on Windows which doesn't have the concept of executable files.
return ($GLOBALS['PHP_CODESNIFFER_PEAR'] || (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'));

}//end shouldSkipTest()

Expand Down

0 comments on commit 65e88a3

Please sign in to comment.