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 /tests/lib/AppFramework/Controller/ControllerTest.php | |
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 'tests/lib/AppFramework/Controller/ControllerTest.php')
-rw-r--r-- | tests/lib/AppFramework/Controller/ControllerTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 23ebe6ec984..675d4b7ccec 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -41,7 +41,7 @@ class ChildController extends Controller { public function custom($in) { $this->registerResponder('json', function ($response) { - return new JSONResponse(array(strlen($response))); + return new JSONResponse([strlen($response)]); }); return $in; @@ -103,9 +103,9 @@ class ControllerTest extends \Test\TestCase { public function testFormat() { - $response = $this->controller->buildResponse(array('hi'), 'json'); + $response = $this->controller->buildResponse(['hi'], 'json'); - $this->assertEquals(array('hi'), $response->getData()); + $this->assertEquals(['hi'], $response->getData()); } @@ -118,10 +118,10 @@ class ControllerTest extends \Test\TestCase { 'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'", ]; - $response = $this->controller->customDataResponse(array('hi')); + $response = $this->controller->customDataResponse(['hi']); $response = $this->controller->buildResponse($response, 'json'); - $this->assertEquals(array('hi'), $response->getData()); + $this->assertEquals(['hi'], $response->getData()); $this->assertEquals(300, $response->getStatus()); $this->assertEquals($expectedHeaders, $response->getHeaders()); } @@ -131,7 +131,7 @@ class ControllerTest extends \Test\TestCase { $response = $this->controller->custom('hi'); $response = $this->controller->buildResponse($response, 'json'); - $this->assertEquals(array(2), $response->getData()); + $this->assertEquals([2], $response->getData()); } |