diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /apps/files/tests/Service | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files/tests/Service')
-rw-r--r-- | apps/files/tests/Service/TagServiceTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index bc7c803953b..a2792a38647 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -132,25 +132,25 @@ class TagServiceTest extends \Test\TestCase { $fileId = $testFile->getId(); // set tags - $this->tagService->updateFileTags('subdir/test.txt', array($tag1, $tag2)); + $this->tagService->updateFileTags('subdir/test.txt', [$tag1, $tag2]); - $this->assertEquals(array($fileId), $this->tagger->getIdsForTag($tag1)); - $this->assertEquals(array($fileId), $this->tagger->getIdsForTag($tag2)); + $this->assertEquals([$fileId], $this->tagger->getIdsForTag($tag1)); + $this->assertEquals([$fileId], $this->tagger->getIdsForTag($tag2)); // remove tag - $this->tagService->updateFileTags('subdir/test.txt', array($tag2)); - $this->assertEquals(array(), $this->tagger->getIdsForTag($tag1)); - $this->assertEquals(array($fileId), $this->tagger->getIdsForTag($tag2)); + $this->tagService->updateFileTags('subdir/test.txt', [$tag2]); + $this->assertEquals([], $this->tagger->getIdsForTag($tag1)); + $this->assertEquals([$fileId], $this->tagger->getIdsForTag($tag2)); // clear tags - $this->tagService->updateFileTags('subdir/test.txt', array()); - $this->assertEquals(array(), $this->tagger->getIdsForTag($tag1)); - $this->assertEquals(array(), $this->tagger->getIdsForTag($tag2)); + $this->tagService->updateFileTags('subdir/test.txt', []); + $this->assertEquals([], $this->tagger->getIdsForTag($tag1)); + $this->assertEquals([], $this->tagger->getIdsForTag($tag2)); // non-existing file $caught = false; try { - $this->tagService->updateFileTags('subdir/unexist.txt', array($tag1)); + $this->tagService->updateFileTags('subdir/unexist.txt', [$tag1]); } catch (\OCP\Files\NotFoundException $e) { $caught = true; } |