diff options
Diffstat (limited to 'tests/lib/Files/Cache/UpdaterLegacyTest.php')
-rw-r--r-- | tests/lib/Files/Cache/UpdaterLegacyTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index a3b1a428c28..6366a8eb7eb 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -40,7 +40,7 @@ class UpdaterLegacyTest extends \Test\TestCase { protected function setUp(): void { parent::setUp(); - $this->storage = new \OC\Files\Storage\Temporary(array()); + $this->storage = new \OC\Files\Storage\Temporary([]); $textData = "dummy file data\n"; $imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo/logo.png'); $this->storage->mkdir('folder'); @@ -63,7 +63,7 @@ class UpdaterLegacyTest extends \Test\TestCase { Filesystem::init(self::$user, '/' . self::$user . '/files'); Filesystem::clearMounts(); - Filesystem::mount($this->storage, array(), '/' . self::$user . '/files'); + Filesystem::mount($this->storage, [], '/' . self::$user . '/files'); \OC_Hook::clear('OC_Filesystem'); } @@ -85,7 +85,7 @@ class UpdaterLegacyTest extends \Test\TestCase { public function testWrite() { $textSize = strlen("dummy file data\n"); $imageSize = filesize(\OC::$SERVERROOT . '/core/img/logo/logo.png'); - $this->cache->put('foo.txt', array('mtime' => 100, 'storage_mtime' => 150)); + $this->cache->put('foo.txt', ['mtime' => 100, 'storage_mtime' => 150]); $rootCachedData = $this->cache->get(''); $this->assertEquals(3 * $textSize + $imageSize, $rootCachedData['size']); @@ -118,10 +118,10 @@ class UpdaterLegacyTest extends \Test\TestCase { } public function testWriteWithMountPoints() { - $storage2 = new \OC\Files\Storage\Temporary(array()); + $storage2 = new \OC\Files\Storage\Temporary([]); $storage2->getScanner()->scan(''); //initialize etags $cache2 = $storage2->getCache(); - Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage'); + Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage'); $view = new View('/' . self::$user . '/files'); $folderCachedData = $view->getFileInfo('folder'); $substorageCachedData = $cache2->get(''); @@ -179,9 +179,9 @@ class UpdaterLegacyTest extends \Test\TestCase { } public function testDeleteWithMountPoints() { - $storage2 = new \OC\Files\Storage\Temporary(array()); + $storage2 = new \OC\Files\Storage\Temporary([]); $cache2 = $storage2->getCache(); - Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage'); + Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage'); Filesystem::file_put_contents('folder/substorage/foo.txt', 'asd'); $view = new View('/' . self::$user . '/files'); $this->assertTrue($cache2->inCache('foo.txt')); @@ -235,9 +235,9 @@ class UpdaterLegacyTest extends \Test\TestCase { } public function testRenameWithMountPoints() { - $storage2 = new \OC\Files\Storage\Temporary(array()); + $storage2 = new \OC\Files\Storage\Temporary([]); $cache2 = $storage2->getCache(); - Filesystem::mount($storage2, array(), '/' . self::$user . '/files/folder/substorage'); + Filesystem::mount($storage2, [], '/' . self::$user . '/files/folder/substorage'); Filesystem::file_put_contents('folder/substorage/foo.txt', 'asd'); $view = new View('/' . self::$user . '/files'); $this->assertTrue($cache2->inCache('foo.txt')); |