aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-12-05 19:57:06 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-11 00:09:55 +0100
commit9ea205dc3dd27f6e2506a4867e29b12180251620 (patch)
treee063d01f8b4be75e3bf823928dbd53d06b51f2f9 /tests
parentd84a1f6f3ae380d42dbd2970d6b3bfedd5e01200 (diff)
downloadnextcloud-server-9ea205dc3dd27f6e2506a4867e29b12180251620.tar.gz
nextcloud-server-9ea205dc3dd27f6e2506a4867e29b12180251620.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/largefilehelpergetfilesize.php9
1 files changed, 9 insertions, 0 deletions
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)