@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | $mock->expects($this->once()) |
| 77 | 77 | ->method('addMessage') |
| 78 | - ->with('some message',Notification::NAMESPACE_SUCCESS) |
|
| 78 | + ->with('some message', Notification::NAMESPACE_SUCCESS) |
|
| 79 | 79 | ->willReturn($mock) |
| 80 | 80 | ; |
| 81 | 81 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ); |
| 88 | 88 | $this->assertSame( |
| 89 | 89 | $mock, |
| 90 | - $mock('some message',Notification::NAMESPACE_SUCCESS) |
|
| 90 | + $mock('some message', Notification::NAMESPACE_SUCCESS) |
|
| 91 | 91 | ); |
| 92 | 92 | } |
| 93 | 93 | |
@@ -100,12 +100,12 @@ discard block |
||
| 100 | 100 | $translator->expects($this->once()) |
| 101 | 101 | ->method('translate') |
| 102 | 102 | ->willReturnMap([ |
| 103 | - ['some message','default','translated some message'], |
|
| 103 | + ['some message', 'default', 'translated some message'], |
|
| 104 | 104 | ]) |
| 105 | 105 | ; |
| 106 | 106 | $listener->expects($this->exactly(2)) |
| 107 | 107 | ->method('trigger') |
| 108 | - ->with(NotificationEvent::EVENT_NOTIFICATION_ADD,$this->isInstanceOf(NotificationEvent::class)) |
|
| 108 | + ->with(NotificationEvent::EVENT_NOTIFICATION_ADD, $this->isInstanceOf(NotificationEvent::class)) |
|
| 109 | 109 | ; |
| 110 | 110 | |
| 111 | 111 | $target->setTranslator($translator); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * @param string $message |
| 123 | 123 | * @dataProvider getTestCreateNamespacedMessages |
| 124 | 124 | */ |
| 125 | - public function testCreateNamespacedMessages($method,$message) |
|
| 125 | + public function testCreateNamespacedMessages($method, $message) |
|
| 126 | 126 | { |
| 127 | 127 | $mock = $this->getMockBuilder(Notification::class) |
| 128 | 128 | ->disableOriginalConstructor() |
@@ -136,21 +136,21 @@ discard block |
||
| 136 | 136 | ->willReturn($mock) |
| 137 | 137 | ; |
| 138 | 138 | |
| 139 | - $callback = array($mock,$method); |
|
| 139 | + $callback = array($mock, $method); |
|
| 140 | 140 | $this->assertSame( |
| 141 | 141 | $mock, |
| 142 | - call_user_func($callback,$message) |
|
| 142 | + call_user_func($callback, $message) |
|
| 143 | 143 | ); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | public function getTestCreateNamespacedMessages() |
| 147 | 147 | { |
| 148 | 148 | return [ |
| 149 | - ['info','info message'], |
|
| 150 | - ['warning','warning message'], |
|
| 151 | - ['success','success message'], |
|
| 152 | - ['danger','danger message'], |
|
| 153 | - ['error','error message'] |
|
| 149 | + ['info', 'info message'], |
|
| 150 | + ['warning', 'warning message'], |
|
| 151 | + ['success', 'success message'], |
|
| 152 | + ['danger', 'danger message'], |
|
| 153 | + ['error', 'error message'] |
|
| 154 | 154 | ]; |
| 155 | 155 | } |
| 156 | 156 | |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | $events->expects($this->exactly(2)) |
| 174 | 174 | ->method('getNotifications') |
| 175 | 175 | ->willReturnOnConsecutiveCalls( |
| 176 | - [],// setup for empty array test |
|
| 177 | - [$entity1,$entity2] // setup for non empty array tests |
|
| 176 | + [], // setup for empty array test |
|
| 177 | + [$entity1, $entity2] // setup for non empty array tests |
|
| 178 | 178 | ) |
| 179 | 179 | ; |
| 180 | 180 | |
@@ -191,8 +191,8 @@ discard block |
||
| 191 | 191 | $mock->expects($this->exactly(2)) |
| 192 | 192 | ->method('renderMessage') |
| 193 | 193 | ->withConsecutive( |
| 194 | - ['some notification',Notification::NAMESPACE_INFO], |
|
| 195 | - ['some notification',Notification::NAMESPACE_DANGER] |
|
| 194 | + ['some notification', Notification::NAMESPACE_INFO], |
|
| 195 | + ['some notification', Notification::NAMESPACE_DANGER] |
|
| 196 | 196 | ) |
| 197 | 197 | ; |
| 198 | 198 | $mock->createOutput($events); |
@@ -222,6 +222,6 @@ discard block |
||
| 222 | 222 | ->willReturn($flash) |
| 223 | 223 | ; |
| 224 | 224 | |
| 225 | - $target->renderMessage('some message',Notification::NAMESPACE_INFO); |
|
| 225 | + $target->renderMessage('some message', Notification::NAMESPACE_INFO); |
|
| 226 | 226 | } |
| 227 | 227 | } |
@@ -92,13 +92,13 @@ |
||
| 92 | 92 | ->disableOriginalConstructor() |
| 93 | 93 | ->getMock() |
| 94 | 94 | ; |
| 95 | - $container = $this->getMockBuilder(ContainerInterface::class) |
|
| 96 | - ->getMock(); |
|
| 97 | - $container->expects($this->once()) |
|
| 98 | - ->method('get') |
|
| 99 | - ->with('ServiceManager') |
|
| 100 | - ->willReturn($sm) |
|
| 101 | - ; |
|
| 95 | + $container = $this->getMockBuilder(ContainerInterface::class) |
|
| 96 | + ->getMock(); |
|
| 97 | + $container->expects($this->once()) |
|
| 98 | + ->method('get') |
|
| 99 | + ->with('ServiceManager') |
|
| 100 | + ->willReturn($sm) |
|
| 101 | + ; |
|
| 102 | 102 | |
| 103 | 103 | $em = $this->getMockBuilder(EventManager::class) |
| 104 | 104 | ->disableOriginalConstructor() |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | public function providePaginatorCreationData() |
| 50 | 50 | { |
| 51 | 51 | return [ |
| 52 | - [ 'Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5] ], |
|
| 53 | - [ 'Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5] ], |
|
| 54 | - [ 'Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2] ], |
|
| 55 | - [ 'Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]], |
|
| 52 | + ['Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5]], |
|
| 53 | + ['Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5]], |
|
| 54 | + ['Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2]], |
|
| 55 | + ['Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]], |
|
| 56 | 56 | ]; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public function testPaginatorCreation($paginatorName, $params, $defaultParams, $usePostParams, $expect) |
| 71 | 71 | { |
| 72 | 72 | if ($defaultParams) { $options = array_merge($params, $defaultParams); } |
| 73 | - else { $options = $params; } |
|
| 73 | + else { $options = $params; } |
|
| 74 | 74 | $request = new Request(); |
| 75 | 75 | if ($usePostParams) { |
| 76 | 76 | $request->setPost(new Parameters($params)); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | $em = $this->getMockBuilder(EventManager::class) |
| 104 | 104 | ->disableOriginalConstructor() |
| 105 | - ->setMethods(['getEvent','triggerEvent']) |
|
| 105 | + ->setMethods(['getEvent', 'triggerEvent']) |
|
| 106 | 106 | ->getMock() |
| 107 | 107 | ; |
| 108 | 108 | |
@@ -69,8 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function testPaginatorCreation($paginatorName, $params, $defaultParams, $usePostParams, $expect) |
| 71 | 71 | { |
| 72 | - if ($defaultParams) { $options = array_merge($params, $defaultParams); } |
|
| 73 | - else { $options = $params; } |
|
| 72 | + if ($defaultParams) { $options = array_merge($params, $defaultParams); } else { $options = $params; } |
|
| 74 | 73 | $request = new Request(); |
| 75 | 74 | if ($usePostParams) { |
| 76 | 75 | $request->setPost(new Parameters($params)); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | ->willReturn($repositories) |
| 38 | 38 | ; |
| 39 | 39 | $ob = FileSender::factory($container); |
| 40 | - $this->assertInstanceOf(FileSender::class,$ob); |
|
| 40 | + $this->assertInstanceOf(FileSender::class, $ob); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public function testSendFile() |
@@ -61,34 +61,34 @@ discard block |
||
| 61 | 61 | ; |
| 62 | 62 | $repo->expects($this->any()) |
| 63 | 63 | ->method('find') |
| 64 | - ->willReturn(null,$file) |
|
| 64 | + ->willReturn(null, $file) |
|
| 65 | 65 | ; |
| 66 | 66 | |
| 67 | 67 | $sender = new FileSender($repositories); |
| 68 | 68 | $sender->setController($controller); |
| 69 | 69 | |
| 70 | 70 | // fist test: response will be 404 if file is not found |
| 71 | - $sender('someRepository',$fileId); |
|
| 72 | - $this->assertEquals(404,$response->getStatusCode()); |
|
| 71 | + $sender('someRepository', $fileId); |
|
| 72 | + $this->assertEquals(404, $response->getStatusCode()); |
|
| 73 | 73 | |
| 74 | 74 | // second test: will handle send file properly |
| 75 | 75 | $file->expects($this->any()) |
| 76 | 76 | ->method('__get') |
| 77 | 77 | ->willReturnMap([ |
| 78 | - ['type','type'], |
|
| 79 | - ['size','size'] |
|
| 78 | + ['type', 'type'], |
|
| 79 | + ['size', 'size'] |
|
| 80 | 80 | ]) |
| 81 | 81 | ; |
| 82 | - $resource = fopen(__FILE__,'r'); |
|
| 82 | + $resource = fopen(__FILE__, 'r'); |
|
| 83 | 83 | $file->expects($this->once()) |
| 84 | 84 | ->method('getResource') |
| 85 | 85 | ->willReturn($resource) |
| 86 | 86 | ; |
| 87 | 87 | ob_start(); |
| 88 | - $sender('someRepository',$fileId); |
|
| 88 | + $sender('someRepository', $fileId); |
|
| 89 | 89 | $output = ob_get_contents(); |
| 90 | 90 | ob_end_clean(); |
| 91 | 91 | |
| 92 | - $this->assertStringEqualsFile(__FILE__,$output); |
|
| 92 | + $this->assertStringEqualsFile(__FILE__, $output); |
|
| 93 | 93 | } |
| 94 | 94 | } |
@@ -90,20 +90,20 @@ discard block |
||
| 90 | 90 | $this->viewResolver->expects($this->any()) |
| 91 | 91 | ->method('resolve') |
| 92 | 92 | ->willReturnMap([ |
| 93 | - ['mail/null-template',null,null], |
|
| 94 | - ['coretest/mail/null-template',null,__DIR__.'/fixtures/mail-template.phtml'], |
|
| 95 | - ['mail/template',null,__DIR__.'/fixtures/mail-template.phtml'], |
|
| 96 | - ['mail/exception',null,__DIR__.'/fixtures/error.phtml'] |
|
| 93 | + ['mail/null-template', null, null], |
|
| 94 | + ['coretest/mail/null-template', null, __DIR__.'/fixtures/mail-template.phtml'], |
|
| 95 | + ['mail/template', null, __DIR__.'/fixtures/mail-template.phtml'], |
|
| 96 | + ['mail/exception', null, __DIR__.'/fixtures/error.phtml'] |
|
| 97 | 97 | ]) |
| 98 | 98 | ; |
| 99 | 99 | |
| 100 | 100 | $container->expects($this->any()) |
| 101 | 101 | ->method('get') |
| 102 | 102 | ->willReturnMap([ |
| 103 | - ['Log/Core/Mail',$this->mailLog], |
|
| 104 | - ['ViewResolver',$this->viewResolver], |
|
| 105 | - ['EventManager',$this->events], |
|
| 106 | - ['ModuleManager',$this->moduleManager] |
|
| 103 | + ['Log/Core/Mail', $this->mailLog], |
|
| 104 | + ['ViewResolver', $this->viewResolver], |
|
| 105 | + ['EventManager', $this->events], |
|
| 106 | + ['ModuleManager', $this->moduleManager] |
|
| 107 | 107 | ]) |
| 108 | 108 | ; |
| 109 | 109 | |
@@ -131,15 +131,15 @@ discard block |
||
| 131 | 131 | public function testTemplate() |
| 132 | 132 | { |
| 133 | 133 | $target = $this->target; |
| 134 | - $params = ['Hello' => 'World','this'=>'this should not rendered']; |
|
| 134 | + $params = ['Hello' => 'World', 'this'=>'this should not rendered']; |
|
| 135 | 135 | |
| 136 | 136 | $target($params); |
| 137 | 137 | $target->template('null-template'); |
| 138 | 138 | |
| 139 | - $this->assertInstanceOf(Sendmail::class,$target->getTransport()); |
|
| 140 | - $this->assertSame($this->controller,$target->getController()); |
|
| 141 | - $this->assertContains('Hello World!',$target->getBody()); |
|
| 142 | - $this->assertNotContains($params['this'],$target->getBody()); |
|
| 139 | + $this->assertInstanceOf(Sendmail::class, $target->getTransport()); |
|
| 140 | + $this->assertSame($this->controller, $target->getController()); |
|
| 141 | + $this->assertContains('Hello World!', $target->getBody()); |
|
| 142 | + $this->assertNotContains($params['this'], $target->getBody()); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | public function testTemplateThrowExceptionWhenTemplateFileError() |
@@ -175,24 +175,24 @@ discard block |
||
| 175 | 175 | /** |
| 176 | 176 | * @dataProvider getTestInformationCompleteException |
| 177 | 177 | */ |
| 178 | - public function testInformationCompleteException($remove,$message) |
|
| 178 | + public function testInformationCompleteException($remove, $message) |
|
| 179 | 179 | { |
| 180 | 180 | $srcFile = __DIR__.'/fixtures/mail-template.phtml'; |
| 181 | 181 | $tplFile = sys_get_temp_dir().'/yawik/mail-template.phtml'; |
| 182 | 182 | |
| 183 | 183 | $contents = file_get_contents($srcFile); |
| 184 | 184 | $pattern = "/^.*".preg_quote($remove).".*$/m"; |
| 185 | - $contents = preg_replace($pattern,'',$contents); |
|
| 186 | - if(!is_dir($dir = dirname($tplFile))){ |
|
| 187 | - mkdir($dir,0777,true); |
|
| 185 | + $contents = preg_replace($pattern, '', $contents); |
|
| 186 | + if (!is_dir($dir = dirname($tplFile))) { |
|
| 187 | + mkdir($dir, 0777, true); |
|
| 188 | 188 | } |
| 189 | - file_put_contents($tplFile,$contents,LOCK_EX); |
|
| 189 | + file_put_contents($tplFile, $contents, LOCK_EX); |
|
| 190 | 190 | |
| 191 | 191 | $resolver = $this->createMock(ResolverInterface::class); |
| 192 | 192 | $resolver->expects($this->any()) |
| 193 | 193 | ->method('resolve') |
| 194 | 194 | ->willReturnMap([ |
| 195 | - ['mail/exception',null,$tplFile] |
|
| 195 | + ['mail/exception', null, $tplFile] |
|
| 196 | 196 | ]) |
| 197 | 197 | ; |
| 198 | 198 | |
@@ -220,9 +220,9 @@ discard block |
||
| 220 | 220 | public function getTestInformationCompleteException() |
| 221 | 221 | { |
| 222 | 222 | return [ |
| 223 | - ['$from','A from email address'], |
|
| 224 | - ['$fromName','A from name'], |
|
| 225 | - ['$subject','A subject must be'], |
|
| 223 | + ['$from', 'A from email address'], |
|
| 224 | + ['$fromName', 'A from name'], |
|
| 225 | + ['$subject', 'A subject must be'], |
|
| 226 | 226 | ]; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | 'Hello' => 'World' |
| 246 | 246 | ]); |
| 247 | 247 | $target->setTransport($transport); |
| 248 | - $target->getHeaders()->addHeaderLine('to','[email protected]'); |
|
| 248 | + $target->getHeaders()->addHeaderLine('to', '[email protected]'); |
|
| 249 | 249 | $target->template('template'); |
| 250 | 250 | $this->assertTrue($target->send()); |
| 251 | 251 | $this->assertContains( |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | $viewModel = new ViewModel(); |
| 46 | 46 | $events->expects($this->any()) |
| 47 | 47 | ->method('trigger') |
| 48 | - ->with($event,'some_target') |
|
| 48 | + ->with($event, 'some_target') |
|
| 49 | 49 | ->willReturn([ |
| 50 | - 'test_template',$viewModel |
|
| 50 | + 'test_template', $viewModel |
|
| 51 | 51 | ]) |
| 52 | 52 | ; |
| 53 | 53 | |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | $target->captureTo('some_path'); |
| 59 | 59 | |
| 60 | 60 | /* @var \Zend\View\Model\ViewModel[] $childs */ |
| 61 | - $output = $target->trigger($event,'some_target'); |
|
| 61 | + $output = $target->trigger($event, 'some_target'); |
|
| 62 | 62 | $childs = $output->getChildren(); |
| 63 | - $this->assertInstanceOf(ViewModel::class,$output); |
|
| 63 | + $this->assertInstanceOf(ViewModel::class, $output); |
|
| 64 | 64 | $this->assertEquals( |
| 65 | 65 | 'test_template', |
| 66 | 66 | $childs[0]->getTemplate() |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | ->willReturn([]) |
| 31 | 31 | ; |
| 32 | 32 | $factory = new ConfigFactory(); |
| 33 | - $service = $factory($container,'some'); |
|
| 33 | + $service = $factory($container, 'some'); |
|
| 34 | 34 | |
| 35 | - $this->assertInstanceOf(Config::class,$service); |
|
| 35 | + $this->assertInstanceOf(Config::class, $service); |
|
| 36 | 36 | } |
| 37 | 37 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | $container = $this->createMock(ContainerInterface::class); |
| 43 | 43 | $ob = ListQuery::factory($container); |
| 44 | - $this->assertInstanceOf(ListQuery::class,$ob); |
|
| 44 | + $this->assertInstanceOf(ListQuery::class, $ob); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function propertiesProvider() |
@@ -49,23 +49,23 @@ discard block |
||
| 49 | 49 | return [ |
| 50 | 50 | [ |
| 51 | 51 | 'pageParamName', |
| 52 | - ['value' => 'somePage','setter_value'=>null,'default'=>'page'] |
|
| 52 | + ['value' => 'somePage', 'setter_value'=>null, 'default'=>'page'] |
|
| 53 | 53 | ], |
| 54 | 54 | [ |
| 55 | - 'propertiesMap' , |
|
| 56 | - ['value'=>'bar','setter_value'=>null,'default'=>array()] |
|
| 55 | + 'propertiesMap', |
|
| 56 | + ['value'=>'bar', 'setter_value'=>null, 'default'=>array()] |
|
| 57 | 57 | ], |
| 58 | 58 | [ |
| 59 | 59 | 'itemsPerPage', |
| 60 | - ['value' => 10,'setter_value'=>null,'default' => 25] |
|
| 60 | + ['value' => 10, 'setter_value'=>null, 'default' => 25] |
|
| 61 | 61 | ], |
| 62 | 62 | [ |
| 63 | 63 | 'queryKeysLowercased', |
| 64 | - ['value' => false,'setter_value'=>null,'default' => true] |
|
| 64 | + ['value' => false, 'setter_value'=>null, 'default' => true] |
|
| 65 | 65 | ], |
| 66 | 66 | [ |
| 67 | 67 | 'sortParamName', |
| 68 | - ['value' => 's','setter_value'=>null,'default' => 'sort'] |
|
| 68 | + ['value' => 's', 'setter_value'=>null, 'default' => 'sort'] |
|
| 69 | 69 | ], |
| 70 | 70 | ]; |
| 71 | 71 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $config = include __DIR__.'/fixtures/config-dump.php'; |
| 59 | 59 | $moduleManager = $this->createMock(ModuleManagerInterface::class); |
| 60 | - return new IndexController($moduleManager,$config); |
|
| 60 | + return new IndexController($moduleManager, $config); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | * @param string $module |
| 66 | 66 | * @dataProvider getTestInvoke |
| 67 | 67 | */ |
| 68 | - public function testInvoke($config,$key=null,$module=null,$expected) |
|
| 68 | + public function testInvoke($config, $key = null, $module = null, $expected) |
|
| 69 | 69 | { |
| 70 | 70 | $plugin = new Config($config); |
| 71 | 71 | $plugin->setController($this->getController()); |
| 72 | - $value = $plugin($key,$module); |
|
| 72 | + $value = $plugin($key, $module); |
|
| 73 | 73 | $this |
| 74 | - ->assertEquals($expected,$value) |
|
| 74 | + ->assertEquals($expected, $value) |
|
| 75 | 75 | ; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | ]; |
| 88 | 88 | |
| 89 | 89 | return [ |
| 90 | - [ $config, 'dashboard', 'Jobs', $config['Jobs']['dashboard'] ], |
|
| 91 | - [ $config, 'dashboard', ['Jobs','Applications'], $combinedOutput ], |
|
| 92 | - [ $config, 'settings', null, $config['Core']['settings'] ], |
|
| 93 | - [ $config, 'Core', true, $config['Core'] ], |
|
| 94 | - [ $config, ['dashboard','form'],['Jobs','Application'], ['Jobs' =>$config['Jobs']] ], |
|
| 90 | + [$config, 'dashboard', 'Jobs', $config['Jobs']['dashboard']], |
|
| 91 | + [$config, 'dashboard', ['Jobs', 'Applications'], $combinedOutput], |
|
| 92 | + [$config, 'settings', null, $config['Core']['settings']], |
|
| 93 | + [$config, 'Core', true, $config['Core']], |
|
| 94 | + [$config, ['dashboard', 'form'], ['Jobs', 'Application'], ['Jobs' =>$config['Jobs']]], |
|
| 95 | 95 | ]; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $plugin->setController($this->getController()); |
| 103 | 103 | |
| 104 | 104 | $this |
| 105 | - ->assertEquals($config['Core']['settings'],$plugin->settings) |
|
| 105 | + ->assertEquals($config['Core']['settings'], $plugin->settings) |
|
| 106 | 106 | ; |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | class SearchFormTest extends \PHPUnit_Framework_TestCase |
| 33 | 33 | { |
| 34 | - use TestInheritanceTrait; |
|
| 34 | + use TestInheritanceTrait; |
|
| 35 | 35 | |
| 36 | 36 | protected $formElementManagerMock; |
| 37 | 37 | |
@@ -127,14 +127,14 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $formData = ['data' => 'value']; |
| 129 | 129 | $hydrator = $this->getMockBuilder(HydratorInterface::class) |
| 130 | - ->setMethods(['hydrate', 'extract']) |
|
| 131 | - ->getMockForAbstractClass(); |
|
| 130 | + ->setMethods(['hydrate', 'extract']) |
|
| 131 | + ->getMockForAbstractClass(); |
|
| 132 | 132 | $hydrator->expects($this->once())->method('extract')->with($this->isInstanceOf(Parameters::class))->willReturn($formData); |
| 133 | 133 | $hydrator->expects($this->once())->method('hydrate')->with($formData, $this->isInstanceOf(Parameters::class)); |
| 134 | 134 | |
| 135 | 135 | $form = $this->getMockBuilder(Form::class) |
| 136 | - ->setMethods(['getHydrator', 'setData']) |
|
| 137 | - ->getMock(); |
|
| 136 | + ->setMethods(['getHydrator', 'setData']) |
|
| 137 | + ->getMock(); |
|
| 138 | 138 | $form->expects($this->once())->method('gethydrator')->willReturn($hydrator); |
| 139 | 139 | $form->expects($this->once())->method('setData')->with($formData); |
| 140 | 140 | $this->formElementManagerMock |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | 'class' => '\Core\Controller\Plugin\SearchForm', |
| 40 | 40 | 'args' => 'getTargetArgs', |
| 41 | 41 | '@testInvokationProxiesToGet' => [ |
| 42 | - 'mock' => [ 'get' ], |
|
| 42 | + 'mock' => ['get'], |
|
| 43 | 43 | 'args' => false, |
| 44 | 44 | ], |
| 45 | 45 | '@testInheritance' => [ |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | ], |
| 48 | 48 | ]; |
| 49 | 49 | |
| 50 | - protected $inheritance = [ AbstractPlugin::class ]; |
|
| 50 | + protected $inheritance = [AbstractPlugin::class]; |
|
| 51 | 51 | |
| 52 | 52 | protected function getTargetArgs() |
| 53 | 53 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function testInvokationProxiesToGet() |
| 64 | 64 | { |
| 65 | 65 | $form = 'TestForm'; |
| 66 | - $options = ['test' => 'test']; |
|
| 66 | + $options = ['test' => 'test']; |
|
| 67 | 67 | |
| 68 | 68 | $this->target->expects($this->once())->method('get')->with($form, $options); |
| 69 | 69 | |