@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -12,11 +12,11 @@ |
||
| 12 | 12 | ->getMockForAbstractClass(); |
| 13 | 13 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 14 | 14 | ->disableOriginalConstructor() |
| 15 | - ->setMethods(['loginUser']) |
|
| 15 | + ->setMethods([ 'loginUser' ]) |
|
| 16 | 16 | ->getMockForAbstractClass(); |
| 17 | 17 | $session = new \Zend\Session\SessionManager(); |
| 18 | 18 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 19 | - ->setMethods(['get']) |
|
| 19 | + ->setMethods([ 'get' ]) |
|
| 20 | 20 | ->getMockForAbstractClass(); |
| 21 | 21 | $container->expects(static::at(0)) |
| 22 | 22 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -34,13 +34,13 @@ |
||
| 34 | 34 | { |
| 35 | 35 | $session = new \Zend\Session\SessionManager(); |
| 36 | 36 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 37 | - ->setMethods(['getAll']) |
|
| 37 | + ->setMethods([ 'getAll' ]) |
|
| 38 | 38 | ->disableOriginalConstructor() |
| 39 | 39 | ->getMockForAbstractClass(); |
| 40 | 40 | $adminUserService->expects(static::once()) |
| 41 | 41 | ->method('getAll') |
| 42 | - ->willReturn([]); |
|
| 42 | + ->willReturn([ ]); |
|
| 43 | 43 | $adminUserHelper = new \Admin\View\Helper\AdminUserHelper($session, $adminUserService); |
| 44 | - static::assertSame([], $adminUserHelper->all()); |
|
| 44 | + static::assertSame([ ], $adminUserHelper->all()); |
|
| 45 | 45 | } |
| 46 | 46 | } |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | public function testGetRandomShouldReturnArray() |
| 17 | 17 | { |
| 18 | 18 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 19 | - ->setMethods(['getForWeb']) |
|
| 19 | + ->setMethods([ 'getForWeb' ]) |
|
| 20 | 20 | ->disableOriginalConstructor() |
| 21 | 21 | ->getMockForAbstractClass(); |
| 22 | 22 | $adminUserService->expects(static::once()) |
| 23 | 23 | ->method('getForWeb') |
| 24 | - ->willReturn([]); |
|
| 24 | + ->willReturn([ ]); |
|
| 25 | 25 | $adminUserHelper = new \Admin\View\Helper\WebAdminUserHelper($adminUserService); |
| 26 | - static::assertSame([], $adminUserHelper->getRandom()); |
|
| 26 | + static::assertSame([ ], $adminUserHelper->getRandom()); |
|
| 27 | 27 | } |
| 28 | 28 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $sessionStorage = new \Zend\Session\Storage\ArrayStorage(); |
| 14 | 14 | $sessionStorage->user = $user; |
| 15 | 15 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 16 | - ->setMethods(['render']) |
|
| 16 | + ->setMethods([ 'render' ]) |
|
| 17 | 17 | ->getMockForAbstractClass(); |
| 18 | 18 | $template->expects(static::once()) |
| 19 | 19 | ->method('render') |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | ->getMock(); |
| 24 | 24 | $sessionManager = $this->getMockBuilder(\Zend\Session\SessionManager::class) |
| 25 | 25 | ->disableOriginalConstructor() |
| 26 | - ->setMethods(['getStorage']) |
|
| 26 | + ->setMethods([ 'getStorage' ]) |
|
| 27 | 27 | ->getMock(); |
| 28 | 28 | $sessionManager->expects(static::any()) |
| 29 | 29 | ->method('getStorage') |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | $sessionStorage = new \Zend\Session\Storage\ArrayStorage(); |
| 50 | 50 | $sessionStorage->user = $user; |
| 51 | 51 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 52 | - ->setMethods(['render']) |
|
| 52 | + ->setMethods([ 'render' ]) |
|
| 53 | 53 | ->getMockForAbstractClass(); |
| 54 | 54 | $template->expects(static::once()) |
| 55 | 55 | ->method('render') |
| 56 | 56 | ->will(static::returnValue('test')); |
| 57 | 57 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 58 | 58 | ->disableOriginalConstructor() |
| 59 | - ->setMethods(['getUser']) |
|
| 59 | + ->setMethods([ 'getUser' ]) |
|
| 60 | 60 | ->getMock(); |
| 61 | 61 | $adminUserService->expects(static::once()) |
| 62 | 62 | ->method('getUser') |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | $sessionStorage = new \Zend\Session\Storage\ArrayStorage(); |
| 87 | 87 | $sessionStorage->user = $user; |
| 88 | 88 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 89 | - ->setMethods(['render']) |
|
| 89 | + ->setMethods([ 'render' ]) |
|
| 90 | 90 | ->getMockForAbstractClass(); |
| 91 | 91 | $template->expects(static::once()) |
| 92 | 92 | ->method('render') |
| 93 | 93 | ->will(static::returnValue('test')); |
| 94 | 94 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 95 | 95 | ->disableOriginalConstructor() |
| 96 | - ->setMethods(['getUser']) |
|
| 96 | + ->setMethods([ 'getUser' ]) |
|
| 97 | 97 | ->getMock(); |
| 98 | 98 | $adminUserService->expects(static::once()) |
| 99 | 99 | ->method('getUser') |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $request = new \Zend\Diactoros\ServerRequest(); |
| 107 | 107 | $request = $request->withAttribute('action', 'edit'); |
| 108 | 108 | $request = $request->withAttribute('id', 1); |
| 109 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 109 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 110 | 110 | $response = new \Zend\Diactoros\Response(); |
| 111 | 111 | $userController = new \Admin\Controller\UserController( |
| 112 | 112 | $template, |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | ->will(static::returnValue('http://unfinished.dev/admin/users')); |
| 139 | 139 | $request = new \Zend\Diactoros\ServerRequest(); |
| 140 | 140 | $request = $request->withAttribute('action', 'save'); |
| 141 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 141 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 142 | 142 | $response = new \Zend\Diactoros\Response(); |
| 143 | 143 | $userController = new \Admin\Controller\UserController( |
| 144 | 144 | $template, |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $request = new \Zend\Diactoros\ServerRequest(); |
| 178 | 178 | $request = $request->withAttribute('action', 'save'); |
| 179 | 179 | $request = $request->withAttribute('id', 2); |
| 180 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 180 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 181 | 181 | $response = new \Zend\Diactoros\Response(); |
| 182 | 182 | $userController = new \Admin\Controller\UserController( |
| 183 | 183 | $template, |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | ->getMockForAbstractClass(); |
| 216 | 216 | $router->expects(static::at(0)) |
| 217 | 217 | ->method('generateUri') |
| 218 | - ->willThrowException(new \Std\FilterException(['test error'])); |
|
| 218 | + ->willThrowException(new \Std\FilterException([ 'test error' ])); |
|
| 219 | 219 | $request = new \Zend\Diactoros\ServerRequest(); |
| 220 | 220 | $request = $request->withAttribute('action', 'save'); |
| 221 | 221 | $request = $request->withAttribute('id', 2); |
| 222 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 222 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 223 | 223 | $response = new \Zend\Diactoros\Response(); |
| 224 | 224 | $userController = new \Admin\Controller\UserController( |
| 225 | 225 | $template, |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | ->willThrowException(new \Exception('test error')); |
| 263 | 263 | $request = new \Zend\Diactoros\ServerRequest(); |
| 264 | 264 | $request = $request->withAttribute('action', 'save'); |
| 265 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 265 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 266 | 266 | $response = new \Zend\Diactoros\Response(); |
| 267 | 267 | $userController = new \Admin\Controller\UserController( |
| 268 | 268 | $template, |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 321 | 321 | ->getMockForAbstractClass(); |
| 322 | 322 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 323 | - ->setMethods(['delete']) |
|
| 323 | + ->setMethods([ 'delete' ]) |
|
| 324 | 324 | ->disableOriginalConstructor() |
| 325 | 325 | ->getMock(); |
| 326 | 326 | $adminUserService->expects(static::once()) |
@@ -15,13 +15,13 @@ discard block |
||
| 15 | 15 | $request = $request->withAttribute('action', 'login'); |
| 16 | 16 | $response = new \Zend\Diactoros\Response\EmptyResponse(); |
| 17 | 17 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 18 | - ->setMethods(['generateUri']) |
|
| 18 | + ->setMethods([ 'generateUri' ]) |
|
| 19 | 19 | ->getMockForAbstractClass(); |
| 20 | 20 | $router->expects(static::at(0)) |
| 21 | 21 | ->method('generateUri') |
| 22 | 22 | ->will(static::returnValue('http://unfinished.dev/admin')); |
| 23 | 23 | $sessionManager = $this->getMockBuilder(\Zend\Session\SessionManager::class) |
| 24 | - ->setMethods(['getStorage', 'writeClose']) |
|
| 24 | + ->setMethods([ 'getStorage', 'writeClose' ]) |
|
| 25 | 25 | ->getMock(); |
| 26 | 26 | $sessionManager->expects(static::at(0)) |
| 27 | 27 | ->method('getStorage') |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | /** @var \Zend\Diactoros\Response\EmptyResponse $response */ |
| 35 | 35 | $response = $auth($request, $response); |
| 36 | 36 | static::assertSame(302, $response->getStatusCode()); |
| 37 | - static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location')); |
|
| 37 | + static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location')); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function testIfUserNotLoggedInLoginActionShouldTakeHimToLoginHtmlPage() |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ->disableOriginalConstructor() |
| 44 | 44 | ->getMockForAbstractClass(); |
| 45 | 45 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 46 | - ->setMethods(['render']) |
|
| 46 | + ->setMethods([ 'render' ]) |
|
| 47 | 47 | ->getMockForAbstractClass(); |
| 48 | 48 | $template->expects(static::at(0)) |
| 49 | 49 | ->method('render') |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 55 | 55 | ->getMockForAbstractClass(); |
| 56 | 56 | $sessionManager = $this->getMockBuilder(\Zend\Session\SessionManager::class) |
| 57 | - ->setMethods(['getStorage', 'writeClose']) |
|
| 57 | + ->setMethods([ 'getStorage', 'writeClose' ]) |
|
| 58 | 58 | ->getMock(); |
| 59 | 59 | $sessionManager->expects(static::at(0)) |
| 60 | 60 | ->method('getStorage') |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $request = $request->withAttribute('action', 'logout'); |
| 82 | 82 | $response = new \Zend\Diactoros\Response\EmptyResponse(); |
| 83 | 83 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 84 | - ->setMethods(['generateUri']) |
|
| 84 | + ->setMethods([ 'generateUri' ]) |
|
| 85 | 85 | ->getMockForAbstractClass(); |
| 86 | 86 | $router->expects(static::at(0)) |
| 87 | 87 | ->method('generateUri') |
@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | $response = $auth($request, $response); |
| 97 | 97 | static::assertNull($sessionManager->getStorage()->user); |
| 98 | 98 | static::assertSame(302, $response->getStatusCode()); |
| 99 | - static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location')); |
|
| 99 | + static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location')); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | public function testUserLoginHandleWithCorrectCredentialsShouldSetUserInSessionStorage() |
| 103 | 103 | { |
| 104 | 104 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 105 | 105 | ->disableOriginalConstructor() |
| 106 | - ->setMethods(['loginUser']) |
|
| 106 | + ->setMethods([ 'loginUser' ]) |
|
| 107 | 107 | ->getMockForAbstractClass(); |
| 108 | 108 | $adminUserService->expects(static::once()) |
| 109 | 109 | ->method('loginUser') |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $request = $request->withAttribute('action', 'loginHandle'); |
| 123 | 123 | $response = new \Zend\Diactoros\Response\EmptyResponse(); |
| 124 | 124 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 125 | - ->setMethods(['generateUri']) |
|
| 125 | + ->setMethods([ 'generateUri' ]) |
|
| 126 | 126 | ->getMockForAbstractClass(); |
| 127 | 127 | $router->expects(static::at(0)) |
| 128 | 128 | ->method('generateUri') |
@@ -135,14 +135,14 @@ discard block |
||
| 135 | 135 | $response = $auth($request, $response); |
| 136 | 136 | static::assertTrue($sessionManager->getStorage()->user->isLoggedIn); |
| 137 | 137 | static::assertSame(302, $response->getStatusCode()); |
| 138 | - static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location')); |
|
| 138 | + static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location')); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | public function testUserLoginHandleWithWrongCredentialsShouldNotSetUserInSessionStorage() |
| 142 | 142 | { |
| 143 | 143 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 144 | 144 | ->disableOriginalConstructor() |
| 145 | - ->setMethods(['loginUser']) |
|
| 145 | + ->setMethods([ 'loginUser' ]) |
|
| 146 | 146 | ->getMockForAbstractClass(); |
| 147 | 147 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 148 | 148 | ->getMockForAbstractClass(); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $request = $request->withAttribute('action', 'loginHandle'); |
| 155 | 155 | $response = new \Zend\Diactoros\Response\EmptyResponse(); |
| 156 | 156 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 157 | - ->setMethods(['generateUri']) |
|
| 157 | + ->setMethods([ 'generateUri' ]) |
|
| 158 | 158 | ->getMockForAbstractClass(); |
| 159 | 159 | $router->expects(static::at(0)) |
| 160 | 160 | ->method('generateUri') |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $response = $auth($request, $response); |
| 169 | 169 | static::assertNull($sessionManager->getStorage()->user); |
| 170 | 170 | static::assertSame(302, $response->getStatusCode()); |
| 171 | - static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location')); |
|
| 171 | + static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location')); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | public function testUserLoginHandleWitAlreadyLoggedInUserShouldRedirectToAdminPage() |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $request = $request->withAttribute('action', 'loginHandle'); |
| 183 | 183 | $response = new \Zend\Diactoros\Response\EmptyResponse(); |
| 184 | 184 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 185 | - ->setMethods(['generateUri']) |
|
| 185 | + ->setMethods([ 'generateUri' ]) |
|
| 186 | 186 | ->getMockForAbstractClass(); |
| 187 | 187 | $router->expects(static::at(0)) |
| 188 | 188 | ->method('generateUri') |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | /** @var \Zend\Diactoros\Response\HtmlResponse $response */ |
| 197 | 197 | $response = $auth($request, $response); |
| 198 | 198 | static::assertSame(302, $response->getStatusCode()); |
| 199 | - static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location')); |
|
| 199 | + static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location')); |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | public function testUserLoginHandleShouldThrowExceptionAndDisplayMessage() |
| 203 | 203 | { |
| 204 | 204 | $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class) |
| 205 | 205 | ->disableOriginalConstructor() |
| 206 | - ->setMethods(['loginUser']) |
|
| 206 | + ->setMethods([ 'loginUser' ]) |
|
| 207 | 207 | ->getMockForAbstractClass(); |
| 208 | 208 | $adminUserService->expects(static::once()) |
| 209 | 209 | ->method('loginUser') |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | ->method('render') |
| 215 | 215 | ->will(static::returnCallback( |
| 216 | 216 | function($tpl, $error) { |
| 217 | - return $error['error']; |
|
| 217 | + return $error[ 'error' ]; |
|
| 218 | 218 | } |
| 219 | 219 | )); |
| 220 | 220 | $request = new \Zend\Diactoros\ServerRequest(); |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | public function testIndexMethodShouldReturnHtmlResponse() |
| 8 | 8 | { |
| 9 | 9 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 10 | - ->setMethods(['render']) |
|
| 10 | + ->setMethods([ 'render' ]) |
|
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $template->expects(static::once()) |
| 13 | 13 | ->method('render') |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $sessionStorage = new \Zend\Session\Storage\ArrayStorage(); |
| 44 | 44 | $sessionStorage->user = $user; |
| 45 | 45 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 46 | - ->setMethods(['render']) |
|
| 46 | + ->setMethods([ 'render' ]) |
|
| 47 | 47 | ->getMockForAbstractClass(); |
| 48 | 48 | $template->expects(static::once()) |
| 49 | 49 | ->method('render') |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $sessionStorage = new \Zend\Session\Storage\ArrayStorage(); |
| 81 | 81 | $sessionStorage->user = $user; |
| 82 | 82 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 83 | - ->setMethods(['render']) |
|
| 83 | + ->setMethods([ 'render' ]) |
|
| 84 | 84 | ->getMockForAbstractClass(); |
| 85 | 85 | $template->expects(static::once()) |
| 86 | 86 | ->method('render') |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $request = new \Zend\Diactoros\ServerRequest(); |
| 100 | 100 | $request = $request->withAttribute('action', 'edit'); |
| 101 | 101 | $request = $request->withAttribute('id', 1); |
| 102 | - $request = $request->withParsedBody(['event' => 'test']); |
|
| 102 | + $request = $request->withParsedBody([ 'event' => 'test' ]); |
|
| 103 | 103 | $response = new \Zend\Diactoros\Response(); |
| 104 | 104 | $eventController = new \Article\Controller\EventController( |
| 105 | 105 | $template, |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ->will(static::returnValue('http://unfinished.dev/admin')); |
| 138 | 138 | $request = new \Zend\Diactoros\ServerRequest(); |
| 139 | 139 | $request = $request->withAttribute('action', 'save'); |
| 140 | - $request = $request->withParsedBody(['event' => 'test']); |
|
| 140 | + $request = $request->withParsedBody([ 'event' => 'test' ]); |
|
| 141 | 141 | $response = new \Zend\Diactoros\Response(); |
| 142 | 142 | $eventController = new \Article\Controller\EventController( |
| 143 | 143 | $template, |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $request = new \Zend\Diactoros\ServerRequest(); |
| 183 | 183 | $request = $request->withAttribute('action', 'save'); |
| 184 | 184 | $request = $request->withAttribute('id', 2); |
| 185 | - $request = $request->withParsedBody(['event' => 'test']); |
|
| 185 | + $request = $request->withParsedBody([ 'event' => 'test' ]); |
|
| 186 | 186 | $response = new \Zend\Diactoros\Response(); |
| 187 | 187 | $eventController = new \Article\Controller\EventController( |
| 188 | 188 | $template, |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | ->getMock(); |
| 222 | 222 | $eventService->expects(static::once()) |
| 223 | 223 | ->method('updateArticle') |
| 224 | - ->willThrowException(new \Std\FilterException(['test error'])); |
|
| 224 | + ->willThrowException(new \Std\FilterException([ 'test error' ])); |
|
| 225 | 225 | $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class) |
| 226 | 226 | ->disableOriginalConstructor() |
| 227 | 227 | ->getMock(); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $request = new \Zend\Diactoros\ServerRequest(); |
| 231 | 231 | $request = $request->withAttribute('action', 'save'); |
| 232 | 232 | $request = $request->withAttribute('id', 2); |
| 233 | - $request = $request->withParsedBody(['event' => 'test']); |
|
| 233 | + $request = $request->withParsedBody([ 'event' => 'test' ]); |
|
| 234 | 234 | $response = new \Zend\Diactoros\Response(); |
| 235 | 235 | $eventController = new \Article\Controller\EventController( |
| 236 | 236 | $template, |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | $request = new \Zend\Diactoros\ServerRequest(); |
| 281 | 281 | $request = $request->withAttribute('action', 'save'); |
| 282 | 282 | $request = $request->withAttribute('id', 2); |
| 283 | - $request = $request->withParsedBody(['event' => 'test']); |
|
| 283 | + $request = $request->withParsedBody([ 'event' => 'test' ]); |
|
| 284 | 284 | $response = new \Zend\Diactoros\Response(); |
| 285 | 285 | $eventController = new \Article\Controller\EventController( |
| 286 | 286 | $template, |