Permalink
Browse files

Merge branch '2.1'

* 2.1:
  Added Base64 encoding, decoding to MongoDBProfilerStorage
  Fix duplicated code and a field name
  refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
  fixed typo
  Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
  fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
  [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
  added dirs generated by build-data.php in locale component to .gitignore
  [Process] Fixed bug introduced by 7bafc69.
  [Process][Tests] Prove process fail (Add more test case)
  [Process][Tests] Prove process fail
  [HttpFoundation] Fixed the tests
  [DomCrawler] Added test for supported encodings by mbstring
  [Config] Fixed preserving keys in associative arrays
  [Console] Fixed return value for Command::run
  [Locale] Fixed tests
  [Console] Fix some input tests
  [Filesystem] Fixed tests on Windows
  [Config] Fixed tests on Windows
  • Loading branch information...
2 parents bf5f02a + 370f2ab commit 1721034eb288f6d3a5a9967c90f778c40232e6ab @fabpot fabpot committed Sep 28, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 Tests/FilesystemTest.php
View
@@ -28,6 +28,23 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
*/
private $filesystem = null;
+ private static $symlinkOnWindows = null;
+
+ public static function setUpBeforeClass()
+ {
+ if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
+ self::$symlinkOnWindows = true;
+ $originDir = tempnam(sys_get_temp_dir(), 'sl');
+ $targetDir = tempnam(sys_get_temp_dir(), 'sl');
+ if (true !== @symlink($originDir, $targetDir)) {
+ $report = error_get_last();
+ if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
+ self::$symlinkOnWindows = false;
+ }
+ }
+ }
+ }
+
public function setUp()
{
$this->filesystem = new Filesystem();
@@ -863,6 +880,10 @@ private function markAsSkippedIfSymlinkIsMissing()
if (!function_exists('symlink')) {
$this->markTestSkipped('symlink is not supported');
}
+
+ if (defined('PHP_WINDOWS_VERSION_MAJOR') && false === self::$symlinkOnWindows) {
+ $this->markTestSkipped('symlink requires "Create symbolic links" privilege on windows');
+ }
}
private function markAsSkippedIfChmodIsMissing()

0 comments on commit 1721034

Please sign in to comment.