@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | use PHPUnit\Framework\TestCase; |
9 | 9 | 'modules' => array_merge($commonModules,array( |
10 | 10 | 'Core', |
11 | - 'Auth', |
|
12 | - 'Jobs', |
|
13 | - 'Organizations', |
|
11 | + 'Auth', |
|
12 | + 'Jobs', |
|
13 | + 'Organizations', |
|
14 | 14 | )), |
15 | 15 | |
16 | 16 | // These are various options for the listeners attached to the ModuleManager |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | // ), |
69 | 69 | // ) |
70 | 70 | |
71 | - // Initial configuration with which to seed the ServiceManager. |
|
72 | - // Should be compatible with Zend\ServiceManager\Config. |
|
73 | - // 'service_manager' => array(), |
|
71 | + // Initial configuration with which to seed the ServiceManager. |
|
72 | + // Should be compatible with Zend\ServiceManager\Config. |
|
73 | + // 'service_manager' => array(), |
|
74 | 74 | ); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | // This should be an array of module namespaces used in the application. |
7 | 7 | |
8 | 8 | use PHPUnit\Framework\TestCase; |
9 | - 'modules' => array_merge($commonModules,array( |
|
9 | + 'modules' => array_merge($commonModules, array( |
|
10 | 10 | 'Core', |
11 | 11 | 'Auth', |
12 | 12 | 'Jobs', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ]; |
55 | 55 | |
56 | 56 | /** @noinspection PhpUnusedPrivateFieldInspection */ |
57 | - private $inheritance = [ EventSubscriber::class ]; |
|
57 | + private $inheritance = [EventSubscriber::class]; |
|
58 | 58 | |
59 | 59 | |
60 | 60 | private function getTarget() |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function testSubscribesToOnFlushEvent() |
68 | 68 | { |
69 | - $this->assertEquals([ Events::onFlush ], $this->target->getSubscribedEvents()); |
|
69 | + $this->assertEquals([Events::onFlush], $this->target->getSubscribedEvents()); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function testUpdatesFilesPermissionsOnFlush() |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | $document->singleFile = $file; |
100 | 100 | $document->fileCollection = $collection; |
101 | 101 | |
102 | - $inserts = [ $document ]; |
|
103 | - $updates = [ $document ]; |
|
102 | + $inserts = [$document]; |
|
103 | + $updates = [$document]; |
|
104 | 104 | |
105 | 105 | $filePermissions->expects($this->exactly(4))->method('clear')->will($this->returnSelf()); |
106 | 106 | $filePermissions->expects($this->exactly(4))->method('inherit')->with($permissions)->will($this->returnSelf()); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | class ConcreteUpdateFilesPermissionsSubScriber extends AbstractUpdateFilesPermissionsSubscriber |
159 | 159 | { |
160 | - protected $filesProperties = [ 'singleFile', 'fileCollection' ]; |
|
160 | + protected $filesProperties = ['singleFile', 'fileCollection']; |
|
161 | 161 | protected $targetDocument = Ufps_TargetDocument::class; |
162 | 162 | } |
163 | 163 |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $translator->expects($this->once()) |
102 | 102 | ->method('translate') |
103 | 103 | ->willReturnMap([ |
104 | - ['some message','default','translated some message'], |
|
104 | + ['some message', 'default', 'translated some message'], |
|
105 | 105 | ]) |
106 | 106 | ; |
107 | 107 | $listener->expects($this->exactly(2)) |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ->willReturn($mock) |
138 | 138 | ; |
139 | 139 | |
140 | - $callback = array($mock,$method); |
|
140 | + $callback = array($mock, $method); |
|
141 | 141 | $this->assertSame( |
142 | 142 | $mock, |
143 | 143 | call_user_func($callback, $message) |
@@ -147,11 +147,11 @@ discard block |
||
147 | 147 | public function getTestCreateNamespacedMessages() |
148 | 148 | { |
149 | 149 | return [ |
150 | - ['info','info message'], |
|
151 | - ['warning','warning message'], |
|
152 | - ['success','success message'], |
|
153 | - ['danger','danger message'], |
|
154 | - ['error','error message'] |
|
150 | + ['info', 'info message'], |
|
151 | + ['warning', 'warning message'], |
|
152 | + ['success', 'success message'], |
|
153 | + ['danger', 'danger message'], |
|
154 | + ['error', 'error message'] |
|
155 | 155 | ]; |
156 | 156 | } |
157 | 157 | |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | $events->expects($this->exactly(2)) |
175 | 175 | ->method('getNotifications') |
176 | 176 | ->willReturnOnConsecutiveCalls( |
177 | - [],// setup for empty array test |
|
178 | - [$entity1,$entity2] // setup for non empty array tests |
|
177 | + [], // setup for empty array test |
|
178 | + [$entity1, $entity2] // setup for non empty array tests |
|
179 | 179 | ) |
180 | 180 | ; |
181 | 181 | |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | $mock->expects($this->exactly(2)) |
193 | 193 | ->method('renderMessage') |
194 | 194 | ->withConsecutive( |
195 | - ['some notification',Notification::NAMESPACE_INFO], |
|
196 | - ['some notification',Notification::NAMESPACE_DANGER] |
|
195 | + ['some notification', Notification::NAMESPACE_INFO], |
|
196 | + ['some notification', Notification::NAMESPACE_DANGER] |
|
197 | 197 | ) |
198 | 198 | ; |
199 | 199 | $mock->createOutput($events); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $mock = $this->getMockBuilder(PaginationParams::class) |
64 | 64 | ->disableOriginalConstructor() |
65 | - ->setMethods(['getParams','getList']) |
|
65 | + ->setMethods(['getParams', 'getList']) |
|
66 | 66 | ->getMock() |
67 | 67 | ; |
68 | 68 | $repository = $this->createMock(RepositoryInterface::class); |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | $mock->expects($this->exactly(2)) |
79 | 79 | ->method('getList') |
80 | 80 | ->withConsecutive( |
81 | - ['some/namespace',[$this,'methodToTest']], |
|
82 | - ['some/namespace',$repository] |
|
81 | + ['some/namespace', [$this, 'methodToTest']], |
|
82 | + ['some/namespace', $repository] |
|
83 | 83 | ) |
84 | 84 | ->willReturn('getList called') |
85 | 85 | ; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ); |
98 | 98 | $this->assertEquals( |
99 | 99 | 'getList called', |
100 | - $mock('some/namespace', [$this,'methodToTest']), |
|
100 | + $mock('some/namespace', [$this, 'methodToTest']), |
|
101 | 101 | '__invoke() should call ::getList when defaults is callable' |
102 | 102 | ); |
103 | 103 | $this->assertEquals( |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $session->list = null; |
180 | 180 | $mock = $this->target; |
181 | 181 | |
182 | - $callback = [$this,'methodToTest']; |
|
182 | + $callback = [$this, 'methodToTest']; |
|
183 | 183 | $output = $mock->getList('namespace', $callback); |
184 | 184 | $this->assertEquals( |
185 | 185 | 'methodToTest called', |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | ->willReturn('next') |
223 | 223 | ; |
224 | 224 | $this->assertEquals( |
225 | - ['previous','next'], |
|
225 | + ['previous', 'next'], |
|
226 | 226 | $mock->getNeighbours('namespace', 'callback', 'id') |
227 | 227 | ); |
228 | 228 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | ->method('trigger') |
50 | 50 | ->with($event, 'some_target') |
51 | 51 | ->willReturn([ |
52 | - 'test_template',$viewModel |
|
52 | + 'test_template', $viewModel |
|
53 | 53 | ]) |
54 | 54 | ; |
55 | 55 |
@@ -77,8 +77,8 @@ |
||
77 | 77 | $file->expects($this->any()) |
78 | 78 | ->method('__get') |
79 | 79 | ->willReturnMap([ |
80 | - ['type','type'], |
|
81 | - ['size','size'] |
|
80 | + ['type', 'type'], |
|
81 | + ['size', 'size'] |
|
82 | 82 | ]) |
83 | 83 | ; |
84 | 84 | $resource = fopen(__FILE__, 'r'); |
@@ -91,20 +91,20 @@ discard block |
||
91 | 91 | $this->viewResolver->expects($this->any()) |
92 | 92 | ->method('resolve') |
93 | 93 | ->willReturnMap([ |
94 | - ['mail/null-template',null,null], |
|
95 | - ['coretest/mail/null-template',null,__DIR__.'/fixtures/mail-template.phtml'], |
|
96 | - ['mail/template',null,__DIR__.'/fixtures/mail-template.phtml'], |
|
97 | - ['mail/exception',null,__DIR__.'/fixtures/error.phtml'] |
|
94 | + ['mail/null-template', null, null], |
|
95 | + ['coretest/mail/null-template', null, __DIR__.'/fixtures/mail-template.phtml'], |
|
96 | + ['mail/template', null, __DIR__.'/fixtures/mail-template.phtml'], |
|
97 | + ['mail/exception', null, __DIR__.'/fixtures/error.phtml'] |
|
98 | 98 | ]) |
99 | 99 | ; |
100 | 100 | |
101 | 101 | $container->expects($this->any()) |
102 | 102 | ->method('get') |
103 | 103 | ->willReturnMap([ |
104 | - ['Log/Core/Mail',$this->mailLog], |
|
105 | - ['ViewResolver',$this->viewResolver], |
|
106 | - ['EventManager',$this->events], |
|
107 | - ['ModuleManager',$this->moduleManager] |
|
104 | + ['Log/Core/Mail', $this->mailLog], |
|
105 | + ['ViewResolver', $this->viewResolver], |
|
106 | + ['EventManager', $this->events], |
|
107 | + ['ModuleManager', $this->moduleManager] |
|
108 | 108 | ]) |
109 | 109 | ; |
110 | 110 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | public function testTemplate() |
133 | 133 | { |
134 | 134 | $target = $this->target; |
135 | - $params = ['Hello' => 'World','this'=>'this should not rendered']; |
|
135 | + $params = ['Hello' => 'World', 'this'=>'this should not rendered']; |
|
136 | 136 | |
137 | 137 | $target($params); |
138 | 138 | $target->template('null-template'); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $resolver->expects($this->any()) |
194 | 194 | ->method('resolve') |
195 | 195 | ->willReturnMap([ |
196 | - ['mail/exception',null,$tplFile] |
|
196 | + ['mail/exception', null, $tplFile] |
|
197 | 197 | ]) |
198 | 198 | ; |
199 | 199 | |
@@ -221,9 +221,9 @@ discard block |
||
221 | 221 | public function getTestInformationCompleteException() |
222 | 222 | { |
223 | 223 | return [ |
224 | - ['$from','A from email address'], |
|
225 | - ['$fromName','A from name'], |
|
226 | - ['$subject','A subject must be'], |
|
224 | + ['$from', 'A from email address'], |
|
225 | + ['$fromName', 'A from name'], |
|
226 | + ['$subject', 'A subject must be'], |
|
227 | 227 | ]; |
228 | 228 | } |
229 | 229 |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | $this->pluginMock = $pluginMock; |
48 | 48 | |
49 | 49 | $controller = $this->getMockBuilder('\Zend\Mvc\Controller\AbstractController') |
50 | - ->setMethods(['getRequest', 'plugin']) |
|
51 | - ->getMockForAbstractClass(); |
|
50 | + ->setMethods(['getRequest', 'plugin']) |
|
51 | + ->getMockForAbstractClass(); |
|
52 | 52 | |
53 | 53 | $controller->expects($this->any())->method('getRequest')->willReturn($this->request); |
54 | 54 | $controller->expects($this->any())->method('plugin')->will($this->returnValueMap( |
55 | 55 | [ |
56 | - ['paginator', null, $pluginMock], |
|
57 | - ['paginationParams', null, $pluginMock], |
|
58 | - ['searchform', null, $pluginMock], |
|
59 | - ] |
|
60 | - )); |
|
56 | + ['paginator', null, $pluginMock], |
|
57 | + ['paginationParams', null, $pluginMock], |
|
58 | + ['searchform', null, $pluginMock], |
|
59 | + ] |
|
60 | + )); |
|
61 | 61 | |
62 | 62 | $this->target->setController($controller); |
63 | 63 | } |
@@ -117,10 +117,10 @@ discard block |
||
117 | 117 | |
118 | 118 | $this->assertAttributeEquals( |
119 | 119 | new Parameters([ |
120 | - 'a' => 'test', 'b' => ['test1', 'test2'], |
|
121 | - 'c' => ['test1', 'test2'], |
|
122 | - 'd' => ['test1' => 1, 'test2' => 1] |
|
123 | - ]), |
|
120 | + 'a' => 'test', 'b' => ['test1', 'test2'], |
|
121 | + 'c' => ['test1', 'test2'], |
|
122 | + 'd' => ['test1' => 1, 'test2' => 1] |
|
123 | + ]), |
|
124 | 124 | 'parameters', |
125 | 125 | $this->target |
126 | 126 | ); |
@@ -98,7 +98,7 @@ |
||
98 | 98 | ->getMock() |
99 | 99 | ; |
100 | 100 | $container = $this->getMockBuilder(ContainerInterface::class) |
101 | - ->getMock(); |
|
101 | + ->getMock(); |
|
102 | 102 | $container->expects($this->once()) |
103 | 103 | ->method('get') |
104 | 104 | ->with('ServiceManager') |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | public function providePaginatorCreationData() |
52 | 52 | { |
53 | 53 | return [ |
54 | - [ 'Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5] ], |
|
55 | - [ 'Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5] ], |
|
56 | - [ 'Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2] ], |
|
57 | - [ 'Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]], |
|
54 | + ['Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5]], |
|
55 | + ['Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5]], |
|
56 | + ['Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2]], |
|
57 | + ['Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]], |
|
58 | 58 | ]; |
59 | 59 | } |
60 | 60 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $em = $this->getMockBuilder(EventManager::class) |
109 | 109 | ->disableOriginalConstructor() |
110 | - ->setMethods(['getEvent','triggerEvent']) |
|
110 | + ->setMethods(['getEvent', 'triggerEvent']) |
|
111 | 111 | ->getMock() |
112 | 112 | ; |
113 | 113 |