diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-03-26 16:35:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 16:35:30 +0100 |
commit | 0c3e2fac54602926cfa1a0965650481dcaf86743 (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /tests/lib/Files/Node/NodeTest.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
parent | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (diff) | |
download | nextcloud-server-0c3e2fac54602926cfa1a0965650481dcaf86743.tar.gz nextcloud-server-0c3e2fac54602926cfa1a0965650481dcaf86743.zip |
Merge pull request #20168 from nextcloud/techdebt/short-array-syntax
Use the short array syntax, everywhere
Diffstat (limited to 'tests/lib/Files/Node/NodeTest.php')
-rw-r--r-- | tests/lib/Files/Node/NodeTest.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 18cc4d80574..b963a395560 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -203,13 +203,13 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); - $stat = array( + $stat = [ 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50, 'permissions' => 0 - ); + ]; $this->view->expects($this->once()) ->method('stat') @@ -225,12 +225,12 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); - $stat = $this->getFileInfo(array( + $stat = $this->getFileInfo([ 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - )); + ]); $this->view->expects($this->once()) ->method('getFileInfo') @@ -247,12 +247,12 @@ abstract class NodeTest extends \Test\TestCase { ->willReturn($this->user); - $stat = $this->getFileInfo(array( + $stat = $this->getFileInfo([ 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - )); + ]); $this->view->expects($this->once()) ->method('getFileInfo') @@ -268,12 +268,12 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); - $stat = $this->getFileInfo(array( + $stat = $this->getFileInfo([ 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - )); + ]); $this->view->expects($this->once()) ->method('getFileInfo') @@ -289,12 +289,12 @@ abstract class NodeTest extends \Test\TestCase { ->method('getUser') ->willReturn($this->user); - $stat = $this->getFileInfo(array( + $stat = $this->getFileInfo([ 'fileid' => 1, 'size' => 100, 'etag' => 'qwerty', 'mtime' => 50 - )); + ]); $this->view->expects($this->once()) ->method('getFileInfo') @@ -319,7 +319,7 @@ abstract class NodeTest extends \Test\TestCase { $this->view->expects($this->once()) ->method('resolvePath') ->with('/bar/foo') - ->willReturn(array($storage, 'foo')); + ->willReturn([$storage, 'foo']); $node = $this->createTestNode($this->root, $this->view, '/bar/foo'); @@ -349,7 +349,7 @@ abstract class NodeTest extends \Test\TestCase { $this->view->expects($this->once()) ->method('resolvePath') ->with('/bar/foo') - ->willReturn(array($storage, 'foo')); + ->willReturn([$storage, 'foo']); $node = $this->createTestNode($this->root, $this->view, '/bar/foo'); @@ -378,7 +378,7 @@ abstract class NodeTest extends \Test\TestCase { $this->view->expects($this->once()) ->method('getFileInfo') ->with('/bar/foo') - ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL))); + ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL])); $node = $this->createTestNode($this->root, $this->view, '/bar/foo'); $node->touch(100); @@ -425,12 +425,12 @@ abstract class NodeTest extends \Test\TestCase { $this->view->expects($this->any()) ->method('resolvePath') ->with('/bar/foo') - ->willReturn(array(null, 'foo')); + ->willReturn([null, 'foo']); $this->view->expects($this->any()) ->method('getFileInfo') ->with('/bar/foo') - ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_ALL))); + ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL])); $node = $this->createTestNode($root, $this->view, '/bar/foo'); $node->touch(100); @@ -448,7 +448,7 @@ abstract class NodeTest extends \Test\TestCase { $this->view->expects($this->any()) ->method('getFileInfo') ->with('/bar/foo') - ->willReturn($this->getFileInfo(array('permissions' => \OCP\Constants::PERMISSION_READ))); + ->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_READ])); $node = $this->createTestNode($this->root, $this->view, '/bar/foo'); $node->touch(100); |