aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/LargeFileHelperGetFileSizeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/LargeFileHelperGetFileSizeTest.php')
-rw-r--r--tests/lib/LargeFileHelperGetFileSizeTest.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php
index 247886fee6a..dbb8658d184 100644
--- a/tests/lib/LargeFileHelperGetFileSizeTest.php
+++ b/tests/lib/LargeFileHelperGetFileSizeTest.php
@@ -8,6 +8,9 @@
namespace Test;
use bantu\IniGetWrapper\IniGetWrapper;
+use OC\LargeFileHelper;
+use OCP\Server;
+use OCP\Util;
/**
* Tests whether LargeFileHelper is able to determine file size at all.
@@ -23,10 +26,10 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->helper = new \OC\LargeFileHelper();
+ $this->helper = new LargeFileHelper();
}
- public function dataFileNameProvider() {
+ public static function dataFileNameProvider(): array {
$path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR;
return [
@@ -44,7 +47,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
'The PHP curl extension is required for this test.'
);
}
- if (\OC::$server->get(IniGetWrapper::class)->getString('open_basedir') !== '') {
+ if (Server::get(IniGetWrapper::class)->getString('open_basedir') !== '') {
$this->markTestSkipped(
'The PHP curl extension does not work with the file:// protocol when open_basedir is enabled.'
);
@@ -62,7 +65,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
if (escapeshellarg('strängé') !== '\'strängé\'') {
$this->markTestSkipped('Your escapeshell args removes accents');
}
- if (!\OCP\Util::isFunctionEnabled('exec')) {
+ if (!Util::isFunctionEnabled('exec')) {
$this->markTestSkipped(
'The exec() function needs to be enabled for this test.'
);