@@ -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') |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | public function testEditMethodShouldReturnHtmlResponseAndGetIdFromRequest() |
| 32 | 32 | { |
| 33 | 33 | $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class) |
| 34 | - ->setMethods(['render']) |
|
| 34 | + ->setMethods([ 'render' ]) |
|
| 35 | 35 | ->getMockForAbstractClass(); |
| 36 | 36 | $template->expects(static::once()) |
| 37 | 37 | ->method('render') |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $request = new \Zend\Diactoros\ServerRequest(); |
| 45 | 45 | $request = $request->withAttribute('action', 'edit'); |
| 46 | 46 | $request = $request->withAttribute('id', 1); |
| 47 | - $request = $request->withParsedBody(['category' => 'test']); |
|
| 47 | + $request = $request->withParsedBody([ 'category' => 'test' ]); |
|
| 48 | 48 | $response = new \Zend\Diactoros\Response(); |
| 49 | 49 | $indexController = new \Category\Controller\IndexController( |
| 50 | 50 | $template, |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ->will(static::returnValue('http://unfinished.dev/admin')); |
| 69 | 69 | $request = new \Zend\Diactoros\ServerRequest(); |
| 70 | 70 | $request = $request->withAttribute('action', 'save'); |
| 71 | - $request = $request->withParsedBody(['category' => 'test']); |
|
| 71 | + $request = $request->withParsedBody([ 'category' => 'test' ]); |
|
| 72 | 72 | $response = new \Zend\Diactoros\Response(); |
| 73 | 73 | $indexController = new \Category\Controller\IndexController( |
| 74 | 74 | $template, |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $request = new \Zend\Diactoros\ServerRequest(); |
| 95 | 95 | $request = $request->withAttribute('action', 'save'); |
| 96 | 96 | $request = $request->withAttribute('id', 1); |
| 97 | - $request = $request->withParsedBody(['category' => 'test']); |
|
| 97 | + $request = $request->withParsedBody([ 'category' => 'test' ]); |
|
| 98 | 98 | $response = new \Zend\Diactoros\Response(); |
| 99 | 99 | $indexController = new \Category\Controller\IndexController( |
| 100 | 100 | $template, |
@@ -117,13 +117,13 @@ discard block |
||
| 117 | 117 | ->getMock(); |
| 118 | 118 | $categoryService->expects(static::once()) |
| 119 | 119 | ->method('updateCategory') |
| 120 | - ->willThrowException(new \Core\Exception\FilterException(['test error'])); |
|
| 120 | + ->willThrowException(new \Core\Exception\FilterException([ 'test error' ])); |
|
| 121 | 121 | $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class) |
| 122 | 122 | ->getMockForAbstractClass(); |
| 123 | 123 | $request = new \Zend\Diactoros\ServerRequest(); |
| 124 | 124 | $request = $request->withAttribute('action', 'save'); |
| 125 | 125 | $request = $request->withAttribute('id', 2); |
| 126 | - $request = $request->withParsedBody(['category' => 'test']); |
|
| 126 | + $request = $request->withParsedBody([ 'category' => 'test' ]); |
|
| 127 | 127 | $response = new \Zend\Diactoros\Response(); |
| 128 | 128 | $indexController = new \Category\Controller\IndexController( |
| 129 | 129 | $template, |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $request = new \Zend\Diactoros\ServerRequest(); |
| 156 | 156 | $request = $request->withAttribute('action', 'save'); |
| 157 | 157 | $request = $request->withAttribute('id', 2); |
| 158 | - $request = $request->withParsedBody(['user' => 'test']); |
|
| 158 | + $request = $request->withParsedBody([ 'user' => 'test' ]); |
|
| 159 | 159 | $response = new \Zend\Diactoros\Response(); |
| 160 | 160 | $indexController = new \Category\Controller\IndexController( |
| 161 | 161 | $template, |
@@ -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') |
@@ -16,26 +16,26 @@ |
||
| 16 | 16 | public function testForSelectShouldReturnArray() |
| 17 | 17 | { |
| 18 | 18 | $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class) |
| 19 | - ->setMethods(['getAll']) |
|
| 19 | + ->setMethods([ 'getAll' ]) |
|
| 20 | 20 | ->disableOriginalConstructor() |
| 21 | 21 | ->getMockForAbstractClass(); |
| 22 | 22 | $categoryService->expects(static::once()) |
| 23 | 23 | ->method('getAll') |
| 24 | - ->willReturn([]); |
|
| 24 | + ->willReturn([ ]); |
|
| 25 | 25 | $categoryHelper = new \Category\View\Helper\CategoryHelper($categoryService); |
| 26 | - static::assertSame([], $categoryHelper->forSelect()); |
|
| 26 | + static::assertSame([ ], $categoryHelper->forSelect()); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function testForHomepageShouldReturnArray() |
| 30 | 30 | { |
| 31 | 31 | $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class) |
| 32 | - ->setMethods(['getCategoriesWithPosts']) |
|
| 32 | + ->setMethods([ 'getCategoriesWithPosts' ]) |
|
| 33 | 33 | ->disableOriginalConstructor() |
| 34 | 34 | ->getMockForAbstractClass(); |
| 35 | 35 | $categoryService->expects(static::once()) |
| 36 | 36 | ->method('getCategoriesWithPosts') |
| 37 | - ->willReturn([]); |
|
| 37 | + ->willReturn([ ]); |
|
| 38 | 38 | $categoryHelper = new \Category\View\Helper\CategoryHelper($categoryService); |
| 39 | - static::assertSame([], $categoryHelper->forHomepage()); |
|
| 39 | + static::assertSame([ ], $categoryHelper->forHomepage()); |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -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') |
@@ -11,11 +11,11 @@ |
||
| 11 | 11 | $categoryMapper = $this->getMockBuilder(\Category\Mapper\CategoryMapper::class) |
| 12 | 12 | ->getMockForAbstractClass(); |
| 13 | 13 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 14 | - ->setMethods(['get']) |
|
| 14 | + ->setMethods([ 'get' ]) |
|
| 15 | 15 | ->getMockForAbstractClass(); |
| 16 | 16 | $container->expects(static::at(0)) |
| 17 | 17 | ->method('get') |
| 18 | - ->will(static::returnValue(['upload' => ['public_path' => 'test', 'non_public_path' => 'test']])); |
|
| 18 | + ->will(static::returnValue([ 'upload' => [ 'public_path' => 'test', 'non_public_path' => 'test' ] ])); |
|
| 19 | 19 | $container->expects(static::at(1)) |
| 20 | 20 | ->method('get') |
| 21 | 21 | ->will(static::returnValue($categoryMapper)); |