Skip to content

Commit dcf809e

Browse files
committed
use value of DIRECTORY_SEPARATOR to detect Windows
This commit unifies the detection of Windows builds across the Symfony codebase.
1 parent 69657e9 commit dcf809e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Functional/SecurityRoutingIntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testRoutingErrorIsNotExposedForProtectedResourceWhenAnonymous($c
3030
*/
3131
public function testRoutingErrorIsExposedWhenNotProtected($config)
3232
{
33-
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50309) {
33+
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50309) {
3434
$this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 fixed in http://svn.php.net/viewvc?view=revision&revision=318366');
3535
}
3636

@@ -46,7 +46,7 @@ public function testRoutingErrorIsExposedWhenNotProtected($config)
4646
*/
4747
public function testRoutingErrorIsNotExposedForProtectedResourceWhenLoggedInWithInsufficientRights($config)
4848
{
49-
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 50309) {
49+
if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID < 50309) {
5050
$this->markTestSkipped('Test hangs on Windows & PHP due to https://bugs.php.net/bug.php?id=60120 fixed in http://svn.php.net/viewvc?view=revision&revision=318366');
5151
}
5252

0 commit comments

Comments
 (0)