merged branch Seldaek/wintest (PR #2204)
Commits
-------
88ebe0c
Adjust the way of checking for windows
Discussion
----------
Adjust the way of checking for windows
This commit is contained in:
commit
8c64202979
@ -45,8 +45,9 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
|
||||
*/
|
||||
static public function isSupported()
|
||||
{
|
||||
return !strstr(PHP_OS, 'WIN');
|
||||
return !defined('PHP_WINDOWS_VERSION_BUILD');
|
||||
}
|
||||
|
||||
/**
|
||||
* Guesses the mime type of the file with the given path
|
||||
*
|
||||
|
@ -75,7 +75,7 @@ class MimeTypeTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testGuessWithNonReadablePath()
|
||||
{
|
||||
if (strstr(PHP_OS, 'WIN')) {
|
||||
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
|
||||
$this->markTestSkipped('Can not verify chmod operations on Windows');
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
|
||||
$current = $f->find();
|
||||
|
||||
//TODO maybe php executable is custom or even windows
|
||||
if (false === strstr(PHP_OS, 'WIN')) {
|
||||
if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
|
||||
$this->assertEquals($current, PHP_BINDIR.DIRECTORY_SEPARATOR.'php', '::find() returns the executable php with suffixes');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user