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/AppFramework/Http/JSONResponseTest.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/AppFramework/Http/JSONResponseTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/JSONResponseTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 95d2e2a0a4c..2a0978db62a 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -49,15 +49,15 @@ class JSONResponseTest extends \Test\TestCase { public function testSetData() { - $params = array('hi', 'yo'); + $params = ['hi', 'yo']; $this->json->setData($params); - $this->assertEquals(array('hi', 'yo'), $this->json->getData()); + $this->assertEquals(['hi', 'yo'], $this->json->getData()); } public function testSetRender() { - $params = array('test' => 'hi'); + $params = ['test' => 'hi']; $this->json->setData($params); $expected = '{"test":"hi"}'; @@ -100,7 +100,7 @@ class JSONResponseTest extends \Test\TestCase { } public function testConstructorAllowsToSetData() { - $data = array('hi'); + $data = ['hi']; $code = 300; $response = new JSONResponse($data, $code); @@ -110,12 +110,12 @@ class JSONResponseTest extends \Test\TestCase { } public function testChainability() { - $params = array('hi', 'yo'); + $params = ['hi', 'yo']; $this->json->setData($params) ->setStatus(Http::STATUS_NOT_FOUND); $this->assertEquals(Http::STATUS_NOT_FOUND, $this->json->getStatus()); - $this->assertEquals(array('hi', 'yo'), $this->json->getData()); + $this->assertEquals(['hi', 'yo'], $this->json->getData()); } } |