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:
Fabien Potencier 2011-09-19 07:36:55 +02:00
commit 8c64202979
3 changed files with 4 additions and 3 deletions

View File

@ -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
*

View File

@ -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');
}

View File

@ -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');
}
}