From 9ea205dc3dd27f6e2506a4867e29b12180251620 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 5 Dec 2014 19:57:06 +0100 Subject: Check if open_basedir is set The file:// protocol does not work with curl when an open_basedir is set. This fixes https://github.com/owncloud/core/issues/12016 --- tests/lib/largefilehelpergetfilesize.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/lib') diff --git a/tests/lib/largefilehelpergetfilesize.php b/tests/lib/largefilehelpergetfilesize.php index c97b7b32b0f..57bc2381966 100644 --- a/tests/lib/largefilehelpergetfilesize.php +++ b/tests/lib/largefilehelpergetfilesize.php @@ -13,6 +13,10 @@ namespace Test; * Large files are not considered yet. */ class LargeFileHelperGetFileSize extends TestCase { + /** @var string */ + protected $filename; + /** @var int */ + protected $fileSize; /** @var \OC\LargeFileHelper */ protected $helper; @@ -41,6 +45,11 @@ class LargeFileHelperGetFileSize extends TestCase { 'The PHP curl extension is required for this test.' ); } + if (\OC::$server->getIniWrapper()->getString('open_basedir') !== '') { + $this->markTestSkipped( + 'The PHP curl extension does not work with the file:// protocol when open_basedir is enabled.' + ); + } $this->assertSame( $fileSize, $this->helper->getFileSizeViaCurl($filename) -- cgit v1.2.3