Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
Factory/Controller/Plugin/InvitationHandlerFactoryTest.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $target = new InvitationHandlerFactory();
45 45
 
46 46
         $tokenGenerator = $this->getMockBuilder('\Auth\Service\UserUniqueTokenGenerator')
47
-                               ->disableOriginalConstructor()->getMock();
47
+                                ->disableOriginalConstructor()->getMock();
48 48
 
49 49
         $userRepository = $this->getMockBuilder('\Auth\Repository\User')->disableOriginalConstructor()->getMock();
50 50
 
@@ -53,21 +53,21 @@  discard block
 block discarded – undo
53 53
 
54 54
         $translator = new \Zend\I18n\Translator\Translator();
55 55
 	
56
-	    $mailer = $this->getMockBuilder('\Core\Controller\Plugin\Mailer')
57
-	                   ->disableOriginalConstructor()
58
-	                   ->getMock()
59
-	    ;
56
+        $mailer = $this->getMockBuilder('\Core\Controller\Plugin\Mailer')
57
+                        ->disableOriginalConstructor()
58
+                        ->getMock()
59
+        ;
60 60
 	    
61 61
         $pluginManager = $this->getMockBuilder(PluginManager::class)
62
-	        ->disableOriginalConstructor()
63
-	        ->getMock()
62
+            ->disableOriginalConstructor()
63
+            ->getMock()
64 64
         ;
65 65
         
66 66
         $pluginManager->expects($this->once())
67
-	        ->method('get')
68
-	        ->with('Core/Mailer')
69
-	        ->willReturn($mailer)
70
-	    ;
67
+            ->method('get')
68
+            ->with('Core/Mailer')
69
+            ->willReturn($mailer)
70
+        ;
71 71
 
72 72
         $emailValidator = new \Zend\Validator\EmailAddress();
73 73
 
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 
77 77
         $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
78 78
         $services->expects($this->exactly(5))
79
-                 ->method('get')
80
-                 ->will($this->returnValueMap(array(
81
-                     array('ValidatorManager', $validators),   // get ha signature ($name, $usePeeringManagers = true)
82
-                     array('translator', $translator),
83
-                     array('repositories', $repositories),
84
-                     array('Auth/UserTokenGenerator', $tokenGenerator),
85
-	                 array('ControllerPluginManager',$pluginManager),
86
-                 )));
79
+                    ->method('get')
80
+                    ->will($this->returnValueMap(array(
81
+                        array('ValidatorManager', $validators),   // get ha signature ($name, $usePeeringManagers = true)
82
+                        array('translator', $translator),
83
+                        array('repositories', $repositories),
84
+                        array('Auth/UserTokenGenerator', $tokenGenerator),
85
+                        array('ControllerPluginManager',$pluginManager),
86
+                    )));
87 87
 
88 88
         /*
89 89
          * test start here
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,17 +78,17 @@
 block discarded – undo
78 78
         $services->expects($this->exactly(5))
79 79
                  ->method('get')
80 80
                  ->will($this->returnValueMap(array(
81
-                     array('ValidatorManager', $validators),   // get ha signature ($name, $usePeeringManagers = true)
81
+                     array('ValidatorManager', $validators), // get ha signature ($name, $usePeeringManagers = true)
82 82
                      array('translator', $translator),
83 83
                      array('repositories', $repositories),
84 84
                      array('Auth/UserTokenGenerator', $tokenGenerator),
85
-	                 array('ControllerPluginManager',$pluginManager),
85
+	                 array('ControllerPluginManager', $pluginManager),
86 86
                  )));
87 87
 
88 88
         /*
89 89
          * test start here
90 90
          */
91
-        $plugin = $target->__invoke($services,'irrelevant');
91
+        $plugin = $target->__invoke($services, 'irrelevant');
92 92
 
93 93
         $this->assertInstanceOf('\Organizations\Controller\Plugin\InvitationHandler', $plugin);
94 94
         $this->assertSame($tokenGenerator, $plugin->getUserTokenGenerator());
Please login to merge, or discard this patch.
test/OrganizationsTest/Factory/Form/EmployeesFieldsetFactoryTest.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
 
45 45
         $headscript = $this->getMockBuilder('\Zend\View\Helper\HeadScript')->disableOriginalConstructor()->getMock();
46 46
         $headscript->expects($this->once())
47
-                   ->method('__call')
48
-                   ->with('appendFile', array('modules/Organizations/js/organizations.employees.js'))
49
-                   ->willReturn(null);
47
+                    ->method('__call')
48
+                    ->with('appendFile', array('modules/Organizations/js/organizations.employees.js'))
49
+                    ->willReturn(null);
50 50
 
51 51
         $basepath   = $this->getMockBuilder('\Zend\View\Helper\BasePath')->disableOriginalConstructor()->getMock();
52 52
         $basepath->expects($this->once())
53
-                 ->method('__invoke')
54
-                 ->with('modules/Organizations/js/organizations.employees.js')
55
-                 ->will($this->returnArgument(0));
53
+                    ->method('__invoke')
54
+                    ->with('modules/Organizations/js/organizations.employees.js')
55
+                    ->will($this->returnArgument(0));
56 56
 
57 57
         $helpers = $this->getMockBuilder('\Zend\View\HelperPluginManager')->disableOriginalConstructor()->getMock();
58 58
         $helpers->expects($this->exactly(2))
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
                 ->will($this->onConsecutiveCalls($headscript, $basepath));
65 65
 
66 66
         $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()
67
-                         ->getMock();
67
+                            ->getMock();
68 68
 
69 69
         $services->expects($this->once())
70
-                 ->method('get')
71
-                 ->with('ViewHelperManager')
72
-                 ->willReturn($helpers);
70
+                    ->method('get')
71
+                    ->with('ViewHelperManager')
72
+                    ->willReturn($helpers);
73 73
 
74 74
         $fieldset = $target->__invoke($services, 'irrelevant');
75 75
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                    ->with('appendFile', array('modules/Organizations/js/organizations.employees.js'))
49 49
                    ->willReturn(null);
50 50
 
51
-        $basepath   = $this->getMockBuilder('\Zend\View\Helper\BasePath')->disableOriginalConstructor()->getMock();
51
+        $basepath = $this->getMockBuilder('\Zend\View\Helper\BasePath')->disableOriginalConstructor()->getMock();
52 52
         $basepath->expects($this->once())
53 53
                  ->method('__invoke')
54 54
                  ->with('modules/Organizations/js/organizations.employees.js')
Please login to merge, or discard this patch.
test/OrganizationsTest/Factory/Form/EmployeeFieldsetFactoryTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@
 block discarded – undo
47 47
 
48 48
         $repos = $this->getMockBuilder('\Core\Repository\RepositoryService')->disableOriginalConstructor()->getMock();
49 49
         $repos->expects($this->once())
50
-              ->method('get')->with('Auth/User')->willReturn($users);
50
+                ->method('get')->with('Auth/User')->willReturn($users);
51 51
 
52 52
         $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
53 53
         $services->expects($this->once())
54
-                 ->method('get')->with('repositories')->willReturn($repos);
54
+                    ->method('get')->with('repositories')->willReturn($repos);
55 55
 	    
56 56
         $fieldset = $target->__invoke($services,'irrelevant');
57 57
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $services->expects($this->once())
54 54
                  ->method('get')->with('repositories')->willReturn($repos);
55 55
 	    
56
-        $fieldset = $target->__invoke($services,'irrelevant');
56
+        $fieldset = $target->__invoke($services, 'irrelevant');
57 57
 
58 58
         $this->assertInstanceOf('\Organizations\Form\EmployeeFieldset', $fieldset);
59 59
 
Please login to merge, or discard this patch.
test/OrganizationsTest/Factory/ImageFileCache/ODMListenerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             ]));
39 39
         
40 40
         $factory = new ODMListenerFactory();
41
-        $listener = $factory->__invoke($serviceLocator,'irrelevant');
41
+        $listener = $factory->__invoke($serviceLocator, 'irrelevant');
42 42
         $this->assertInstanceOf(ODMListener::class, $listener);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
test/OrganizationsTest/Factory/ImageFileCache/ManagerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             ]));
35 35
         
36 36
         $factory = new ManagerFactory();
37
-        $listener = $factory->__invoke($serviceLocator,'irrelevant');
37
+        $listener = $factory->__invoke($serviceLocator, 'irrelevant');
38 38
         $this->assertInstanceOf(Manager::class, $listener);
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
OrganizationsTest/Factory/ImageFileCache/ApplicationListenerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             ]));
52 52
         
53 53
         $factory = new ApplicationListenerFactory();
54
-        $listener = $factory->__invoke($serviceLocator,'irrelevant');
54
+        $listener = $factory->__invoke($serviceLocator, 'irrelevant');
55 55
         $this->assertInstanceOf(ApplicationListener::class, $listener);
56 56
     }
57 57
 }
Please login to merge, or discard this patch.
test/OrganizationsTest/Auth/Dependency/EmployeeListListenerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         $view = $this->getMockBuilder(View::class)
91 91
             ->getMock();
92 92
         
93
-        $actual = $this->listListener->getItems($user, $view , 10);
93
+        $actual = $this->listListener->getItems($user, $view, 10);
94 94
         
95 95
         $this->assertInternalType('array', $actual);
96 96
         $this->assertCount($expected, $actual);
Please login to merge, or discard this patch.
Organizations/test/OrganizationsTest/Controller/ProfileControllerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $pluginManager->expects($this->any())
104 104
             ->method('get')
105 105
             ->willReturnMap([
106
-                ['params',null,$params]
106
+                ['params', null, $params]
107 107
             ])
108 108
         ;
109 109
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $plugins->expects($this->any())
127 127
             ->method('get')
128 128
             ->willReturnMap([
129
-                ['params',null,$params]
129
+                ['params', null, $params]
130 130
             ])
131 131
         ;
132 132
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $plugins->expects($this->any())
151 151
             ->method('get')
152 152
             ->willReturnMap([
153
-                ['params',null,$params]
153
+                ['params', null, $params]
154 154
             ])
155 155
         ;
156 156
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $pluginManager->expects($this->any())
183 183
             ->method('get')
184 184
             ->willReturnMap([
185
-                ['params',null,$params]
185
+                ['params', null, $params]
186 186
             ])
187 187
         ;
188 188
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $pluginManager->expects($this->any())
218 218
             ->method('get')
219 219
             ->willReturnMap([
220
-                ['params',null,$params]
220
+                ['params', null, $params]
221 221
             ])
222 222
         ;
223 223
 
Please login to merge, or discard this patch.
test/OrganizationsTest/Controller/Plugin/InvitationHandlerTest.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
         }
62 62
         if (in_array('userTokenGenerator', $mocks)) {
63 63
             $this->userTokenGeneratorMock = $this->getMockBuilder('\Auth\Service\UserUniqueTokenGenerator')
64
-                                             ->disableOriginalConstructor()->getMock();
64
+                                                ->disableOriginalConstructor()->getMock();
65 65
         }
66 66
         if (in_array('mailerPlugin', $mocks)) {
67 67
             $this->mailerPluginMock   = $this->getMockBuilder('\Core\Controller\Plugin\Mailer')
68
-                                         ->disableOriginalConstructor()->getMock();
68
+                                            ->disableOriginalConstructor()->getMock();
69 69
         }
70 70
 
71 71
         if ($inject) {
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
         $email = 'invalidEmailAddress';
134 134
         $message = 'Email address is invalid.';
135 135
         $this->translatorMock->expects($this->exactly(5))
136
-                             ->method('translate')
137
-                             ->with($message)
138
-                             ->will($this->returnArgument(0));
136
+                                ->method('translate')
137
+                                ->with($message)
138
+                                ->will($this->returnArgument(0));
139 139
 
140 140
         $expected = array(
141 141
             'ok' => false,
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $user->getInfo()->setEmail($email);
161 161
 
162 162
         $this->userRepositoryMock->expects($this->once())->method('findByEmail')->with($email, null)
163
-                                 ->willReturn($user);
163
+                                    ->willReturn($user);
164 164
         $this->userRepositoryMock->expects($this->never())->method('create');
165 165
         $this->userTokenGeneratorMock->expects($this->once())->method('generate')->with($user, 7)->willReturn('testToken');
166 166
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $user->getInfo()->setEmail($email);
193 193
 
194 194
         $this->userRepositoryMock->expects($this->once())->method('findByEmail')->with($email, null)
195
-                                 ->willReturn(null);
195
+                                    ->willReturn(null);
196 196
         $this->userRepositoryMock->expects($this->once())->method('create')->willReturn($user);
197 197
         $this->userTokenGeneratorMock->expects($this->once())->method('generate')->with($user, 7)->willReturn('testToken');
198 198
 
@@ -227,12 +227,12 @@  discard block
 block discarded – undo
227 227
 
228 228
         $message = 'Sending invitation mail failed.';
229 229
         $this->translatorMock->expects($this->once())
230
-                             ->method('translate')
231
-                             ->with($message)
232
-                             ->will($this->returnArgument(0));
230
+                                ->method('translate')
231
+                                ->with($message)
232
+                                ->will($this->returnArgument(0));
233 233
 
234 234
         $this->userRepositoryMock->expects($this->once())->method('findByEmail')->with($email, null)
235
-                                 ->willReturn($user);
235
+                                    ->willReturn($user);
236 236
         $this->userRepositoryMock->expects($this->never())->method('create');
237 237
         $this->userTokenGeneratorMock->expects($this->once())->method('generate')->with($user, 7)->willReturn('testToken');
238 238
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
                                              ->disableOriginalConstructor()->getMock();
65 65
         }
66 66
         if (in_array('mailerPlugin', $mocks)) {
67
-            $this->mailerPluginMock   = $this->getMockBuilder('\Core\Controller\Plugin\Mailer')
67
+            $this->mailerPluginMock = $this->getMockBuilder('\Core\Controller\Plugin\Mailer')
68 68
                                          ->disableOriginalConstructor()->getMock();
69 69
         }
70 70
 
71 71
         if ($inject) {
72 72
             foreach ($mocks as $key) {
73
-                $setter = 'set' . $key;
74
-                $this->target->$setter($this->{$key . 'Mock'});
73
+                $setter = 'set'.$key;
74
+                $this->target->$setter($this->{$key.'Mock'});
75 75
             }
76 76
         }
77 77
     }
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $this->setupMocks($mockKey);
108 108
 
109
-        $setter = 'set' . ucfirst($mockKey);
110
-        $getter = 'get' . ucfirst($mockKey);
111
-        $value  = $this->{$mockKey . 'Mock'};
109
+        $setter = 'set'.ucfirst($mockKey);
110
+        $getter = 'get'.ucfirst($mockKey);
111
+        $value  = $this->{$mockKey.'Mock'};
112 112
 
113 113
         $this->assertSame($this->target, $this->target->$setter($value), 'Fluent interface broken!');
114 114
         $this->assertSame($value, $this->target->$getter());
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function testGetterThrowExceptionIfDependencyMissing($getterName)
124 124
     {
125
-        $getter = "get" . $getterName;
125
+        $getter = "get".$getterName;
126 126
 
127 127
         $this->target->$getter();
128 128
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             'message' => $message,
143 143
         );
144 144
 
145
-        foreach (array($email, null, '', 0, array()) as $testEmail)  {
145
+        foreach (array($email, null, '', 0, array()) as $testEmail) {
146 146
             $result = $this->target->process($testEmail);
147 147
 
148 148
             $this->assertEquals($expected, $result);
Please login to merge, or discard this patch.