From a17aa5e091585ef0599e941a1cbc0d786833d85b Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Mon, 12 Oct 2015 17:04:38 +0200 Subject: [PATCH] Fixed failing test for HHVM --- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- src/Symfony/Component/Filesystem/Tests/FilesystemTest.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 194771ea08..ff2a66746c 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -565,6 +565,6 @@ class Filesystem { $components = explode('://', $filename, 2); - return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]); + return 2 === count($components) ? array($components[0], $components[1]) : array(null, $components[0]); } } diff --git a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php index b9ad6c26f5..ea38e17df5 100644 --- a/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php +++ b/src/Symfony/Component/Filesystem/Tests/FilesystemTest.php @@ -1047,7 +1047,7 @@ class FilesystemTest extends FilesystemTestCase $this->assertFileExists($filename); // Tear down - unlink($filename); + @unlink($filename); } public function testDumpFile() @@ -1106,6 +1106,10 @@ class FilesystemTest extends FilesystemTestCase public function testDumpFileWithFileScheme() { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('HHVM does not handle the file:// scheme correctly'); + } + $scheme = 'file://'; $filename = $scheme.$this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';