Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Storage/Wrapper/QuotaTest.php')
-rw-r--r--tests/lib/Files/Storage/Wrapper/QuotaTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
index 164541b670c..65cfe30eb1c 100644
--- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php
+++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
@@ -31,8 +31,8 @@ class QuotaTest extends \Test\Files\Storage\Storage {
parent::setUp();
$this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
- $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
- $this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000));
+ $storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
+ $this->instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 10000000]);
}
protected function tearDown(): void {
@@ -44,10 +44,10 @@ class QuotaTest extends \Test\Files\Storage\Storage {
* @param integer $limit
*/
protected function getLimitedStorage($limit) {
- $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
+ $storage = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]);
$storage->mkdir('files');
$storage->getScanner()->scan('');
- return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $limit));
+ return new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => $limit]);
}
public function testFilePutContentsNotEnoughSpace() {
@@ -70,7 +70,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpace() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 3)
+ '', ['size' => 3]
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -85,9 +85,9 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->willReturn(-2);
$storage->getScanner()->scan('');
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 9));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 9]);
$instance->getCache()->put(
- '', array('size' => 3)
+ '', ['size' => 3]
);
$this->assertEquals(6, $instance->free_space(''));
}
@@ -95,7 +95,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
public function testFreeSpaceWithUsedSpaceAndEncryption() {
$instance = $this->getLimitedStorage(9);
$instance->getCache()->put(
- '', array('size' => 7)
+ '', ['size' => 7]
);
$this->assertEquals(2, $instance->free_space(''));
}
@@ -140,7 +140,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->method('fopen')
->willReturn(false);
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $failStorage, 'quota' => 1000));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $failStorage, 'quota' => 1000]);
$this->assertFalse($instance->fopen('failedfopen', 'r'));
}
@@ -198,7 +198,7 @@ class QuotaTest extends \Test\Files\Storage\Storage {
->with('files')
->willReturn(new CacheEntry(['size' => 50]));
- $instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 1024, 'root' => 'files'));
+ $instance = new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => 1024, 'root' => 'files']);
$this->assertEquals(1024 - 50, $instance->free_space(''));
}