Completed
Push — develop ( 33eed9...a73e2c )
by Carsten
21s queued 14s
created
module/Jobs/test/JobsTest/Listener/MailSenderTest.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
             default:
63 63
                 $this->mailServiceMock = $this->getMockBuilder('\Core\Mail\MailService')->disableOriginalConstructor()->getMock();
64 64
                 $this->mailServiceMock->expects($this->atLeastOnce())
65
-                                      ->method('send')
66
-                                      ->with($this->isInstanceOf(HTMLTemplateMessage::class))
65
+                                        ->method('send')
66
+                                        ->with($this->isInstanceOf(HTMLTemplateMessage::class))
67 67
                 ;
68 68
                 $this->mailServiceMock->expects($this->any())
69
-                                      ->method('get')->with('htmltemplate')
70
-                                      ->will($this->returnCallback(array($this, 'pushMailMock')));
69
+                                        ->method('get')->with('htmltemplate')
70
+                                        ->will($this->returnCallback(array($this, 'pushMailMock')));
71 71
 
72 72
 
73 73
                 $this->targetOptions = array('siteName' => 'Test', 'adminEmail' => 'test@admin');
@@ -106,29 +106,29 @@  discard block
 block discarded – undo
106 106
     public function testAttachsToAndDetachsFromJobEvents()
107 107
     {
108 108
         $events = $this->getMockBuilder('\Zend\EventManager\EventManager')
109
-                       ->disableOriginalConstructor()
110
-                       ->getMock();
109
+                        ->disableOriginalConstructor()
110
+                        ->getMock();
111 111
 
112 112
         $callback1 = [new MailSenderListenerMock(),'listen1'];
113 113
         $callback2 = [new MailSenderListenerMock(),'listen2'];
114 114
         $callback3 = [new MailSenderListenerMock(),'listen3'];
115 115
         $events->expects($this->exactly(3))
116
-               ->method('attach')
117
-               ->withConsecutive(
118
-                   array(JobEvent::EVENT_JOB_CREATED, array($this->target, 'onJobCreated')),
119
-                   array(JobEvent::EVENT_JOB_ACCEPTED, array($this->target, 'onJobAccepted')),
120
-                   array(JobEvent::EVENT_JOB_REJECTED, array($this->target, 'onJobRejected'))
121
-               )
122
-               ->will($this->onConsecutiveCalls($callback1, $callback2, $callback3))
116
+                ->method('attach')
117
+                ->withConsecutive(
118
+                    array(JobEvent::EVENT_JOB_CREATED, array($this->target, 'onJobCreated')),
119
+                    array(JobEvent::EVENT_JOB_ACCEPTED, array($this->target, 'onJobAccepted')),
120
+                    array(JobEvent::EVENT_JOB_REJECTED, array($this->target, 'onJobRejected'))
121
+                )
122
+                ->will($this->onConsecutiveCalls($callback1, $callback2, $callback3))
123 123
         ;
124 124
 
125 125
         $events->expects($this->exactly(3))
126
-               ->method('detach')
127
-               ->withConsecutive(
128
-                   array($callback1),
129
-                   array($callback2),
130
-                   array($callback3)
131
-               )->willReturn(true);
126
+                ->method('detach')
127
+                ->withConsecutive(
128
+                    array($callback1),
129
+                    array($callback2),
130
+                    array($callback3)
131
+                )->willReturn(true);
132 132
 
133 133
         $this->target->attach($events);
134 134
         $this->assertAttributeEquals(array($callback1, $callback2, $callback3), 'listeners', $this->target);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,9 +109,9 @@
 block discarded – undo
109 109
                        ->disableOriginalConstructor()
110 110
                        ->getMock();
111 111
 
112
-        $callback1 = [new MailSenderListenerMock(),'listen1'];
113
-        $callback2 = [new MailSenderListenerMock(),'listen2'];
114
-        $callback3 = [new MailSenderListenerMock(),'listen3'];
112
+        $callback1 = [new MailSenderListenerMock(), 'listen1'];
113
+        $callback2 = [new MailSenderListenerMock(), 'listen2'];
114
+        $callback3 = [new MailSenderListenerMock(), 'listen3'];
115 115
         $events->expects($this->exactly(3))
116 116
                ->method('attach')
117 117
                ->withConsecutive(
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Listener/GetOrganizationManagersTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 
95 95
     private function createOrganization(array $spec)
96 96
     {
97
-        $flag = function ($key) use ($spec) {
97
+        $flag = function($key) use ($spec) {
98 98
             return isset($spec[$key]) && $spec[$key];
99 99
         };
100 100
         $org = $this
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Listener/PublisherTest.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -131,62 +131,62 @@  discard block
 block discarded – undo
131 131
                 ->will($this->returnValue('<html />'));
132 132
 
133 133
         $this->viewPhpRendererStrategy = $this->getMockBuilder('\Zend\View\Strategy\PhpRendererStrategy')
134
-                          ->disableOriginalConstructor()
135
-                          ->getMock();
134
+                            ->disableOriginalConstructor()
135
+                            ->getMock();
136 136
 
137 137
         $this->viewPhpRendererStrategy->expects($this->once())
138
-                          ->method('getRenderer')
139
-                          ->will($this->returnValue($this->renderer));
138
+                            ->method('getRenderer')
139
+                            ->will($this->returnValue($this->renderer));
140 140
 
141 141
         $this->response = $this->getMockBuilder('\Zend\Http\Response')
142
-                                              ->disableOriginalConstructor()
143
-                                              ->getMock();
142
+                                                ->disableOriginalConstructor()
143
+                                                ->getMock();
144 144
 
145 145
         $this->jobEvent = $this->getMockBuilder('\Jobs\Listener\Events\JobEvent')
146
-                               ->disableOriginalConstructor()
147
-                               ->getMock();
146
+                                ->disableOriginalConstructor()
147
+                                ->getMock();
148 148
 
149 149
         $this->job = $this->getMockBuilder('\Jobs\Entity\Job')
150
-                          ->disableOriginalConstructor()
151
-                          ->getMock();
150
+                            ->disableOriginalConstructor()
151
+                            ->getMock();
152 152
 
153 153
         $this->publisher = $this->getMockBuilder('\Jobs\Entity\Publisher')
154
-                          ->disableOriginalConstructor()
155
-                          ->getMock();
154
+                            ->disableOriginalConstructor()
155
+                            ->getMock();
156 156
 
157 157
         $this->publisher->expects($this->at(0))
158
-                           ->method('__get')
159
-                           ->with('externalId')
160
-                           ->will($this->returnValue('externalId32'));
158
+                            ->method('__get')
159
+                            ->with('externalId')
160
+                            ->will($this->returnValue('externalId32'));
161 161
 
162 162
         $this->publisher->expects($this->at(1))
163
-                           ->method('__get')
164
-                           ->with('reference')
165
-                           ->will($this->returnValue('reference32'));
163
+                            ->method('__get')
164
+                            ->with('reference')
165
+                            ->will($this->returnValue('reference32'));
166 166
 
167 167
         $this->publisher->expects($this->any())
168
-                              ->method('__set')
169
-                              ->will($this->returnCallback($staticClassPrefix . 'publisherSetter'));
168
+                                ->method('__set')
169
+                                ->will($this->returnCallback($staticClassPrefix . 'publisherSetter'));
170 170
 
171 171
         $this->htmlAbsPathFilter = $this->getMockBuilder('\Core\Filter\HtmlAbsPathFilter')
172 172
                                     ->disableOriginalConstructor()
173 173
                                     ->getMock();
174 174
 
175 175
         $this->htmlAbsPathFilter->expects($this->any())
176
-                              ->method('filter')
177
-                              ->will($this->returnCallback($staticClassPrefix . 'absPathFilter'));
176
+                                ->method('filter')
177
+                                ->will($this->returnCallback($staticClassPrefix . 'absPathFilter'));
178 178
 
179 179
         $this->filterManager = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')
180
-                                     ->disableOriginalConstructor()
181
-                                     ->getMock();
180
+                                        ->disableOriginalConstructor()
181
+                                        ->getMock();
182 182
 
183 183
         $this->filterManager->expects($this->at(0))
184 184
                         ->method('get')
185 185
                         ->willReturn($this->htmlAbsPathFilter);
186 186
 
187 187
         $this->restClient = $this->getMockBuilder('\Core\Service\RestClient')
188
-                                 ->disableOriginalConstructor()
189
-                                 ->getMock();
188
+                                    ->disableOriginalConstructor()
189
+                                    ->getMock();
190 190
 
191 191
         //$this->restClient->expects($this->at(0))
192 192
         //                   ->method('getHost')
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
             ->will($this->returnValue($this->response));
203 203
 
204 204
         $this->organization = $this->getMockBuilder('\Organizations\Entity\Organization')
205
-                                 ->disableOriginalConstructor()
206
-                                 ->getMock();
205
+                                    ->disableOriginalConstructor()
206
+                                    ->getMock();
207 207
 
208 208
         $this->organization->expects($this->at(0))
209 209
                         ->method('__get')
@@ -211,21 +211,21 @@  discard block
 block discarded – undo
211 211
                         ->will($this->returnValue('name32'));
212 212
 
213 213
         $this->provider = $this->getMockBuilder('\Jobs\Options\ProviderOptions')
214
-                                   ->disableOriginalConstructor()
215
-                                   ->getMock();
214
+                                    ->disableOriginalConstructor()
215
+                                    ->getMock();
216 216
 
217 217
         $this->providerChannel = $this->getMockBuilder('\Jobs\Options\ChannelOptions')
218
-                                      ->disableOriginalConstructor()
219
-                                      ->getMock();
218
+                                        ->disableOriginalConstructor()
219
+                                        ->getMock();
220 220
 
221 221
         $this->providerChannel->expects($this->any())
222
-                              ->method('__get')
223
-                              ->will($this->returnCallback($staticClassPrefix . 'providerChannelGetter'));
222
+                                ->method('__get')
223
+                                ->will($this->returnCallback($staticClassPrefix . 'providerChannelGetter'));
224 224
 
225 225
         $this->provider->expects($this->any(0))
226
-                       ->method('__get')
227
-                       ->with('channels')
228
-                       ->willReturn(array('bbb value' => $this->providerChannel));
226
+                        ->method('__get')
227
+                        ->with('channels')
228
+                        ->willReturn(array('bbb value' => $this->providerChannel));
229 229
 
230 230
         $this->viewModel = $this->getMockBuilder('\Zend\View\Model\ViewModel')
231 231
                                 ->disableOriginalConstructor()
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
     protected function setRestReturn($referenceUpdate, $applyIdUpdate)
307 307
     {
308 308
         $this->response->expects($this->any())
309
-                       ->method('getBody')
310
-                       ->will($this->returnValue(json_encode(
311
-                           array(
312
-                               'referenceUpdate' => $referenceUpdate,
313
-                               'applyIdUpdate' => $applyIdUpdate
314
-                           )
315
-                       )));
309
+                        ->method('getBody')
310
+                        ->will($this->returnValue(json_encode(
311
+                            array(
312
+                                'referenceUpdate' => $referenceUpdate,
313
+                                'applyIdUpdate' => $applyIdUpdate
314
+                            )
315
+                        )));
316 316
     }
317 317
 
318 318
 
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Acl/WriteAssertionTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
         foreach (array($role, $user) as $testObj) {
71 71
             // non user is always false?
72 72
             foreach ($privileges as $p) {
73
-                $this->assertFalse((bool)$target->assert($acl, $testObj, null, $p));
73
+                $this->assertFalse((bool) $target->assert($acl, $testObj, null, $p));
74 74
             }
75 75
 
76 76
             // user and wrong privilege is false?
77 77
             foreach ($privileges as $p) {
78 78
                 // Casting null to false is safe here, 'edit' for pair user-privilege tested after
79
-                $this->assertFalse((bool)$target->assert($acl, $testObj, $job, $p));
79
+                $this->assertFalse((bool) $target->assert($acl, $testObj, $job, $p));
80 80
             }
81 81
         }
82 82
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function testAssertWithoutOrganisation($input, $expected)
125 125
     {
126
-        $method="assert".($expected?"True":"False");
126
+        $method = "assert".($expected ? "True" : "False");
127 127
 
128 128
         $this->$method(
129 129
                 $this->target->assert(
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
 
161 161
 
162 162
         return [
163
-            [[new Acl(), null, null, null] , false ],
164
-            [[new Acl(), null, null, Permissions::PERMISSION_CHANGE] , false ],
165
-            [[new Acl(), $user, $jobMock, 'edit'] , true ],
163
+            [[new Acl(), null, null, null], false],
164
+            [[new Acl(), null, null, Permissions::PERMISSION_CHANGE], false],
165
+            [[new Acl(), $user, $jobMock, 'edit'], true],
166 166
         ];
167 167
     }
168 168
 
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
         $this->assertTrue(
190 190
             $this->target->assert(
191 191
                 new Acl(), // acl
192
-                $user,     // role
193
-                $jobMock,  // resource
192
+                $user, // role
193
+                $jobMock, // resource
194 194
                 'edit'     // privilege
195 195
             )
196 196
         );
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
         $this->assertTrue(
224 224
             $this->target->assert(
225 225
                 new Acl(), // acl
226
-                $user,     // role
227
-                $jobMock,  // resource
226
+                $user, // role
227
+                $jobMock, // resource
228 228
                 'edit'     // privilege
229 229
             )
230 230
         );
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
         $this->assertTrue(
265 265
             $this->target->assert(
266 266
                 new Acl(), // acl
267
-                $user,     // role
268
-                $jobMock,  // resource
267
+                $user, // role
268
+                $jobMock, // resource
269 269
                 'edit'     // privilege
270 270
             )
271 271
         );
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Auth/Dependency/ListListenerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             ->getMock();
73 73
         $translator->expects($this->once())
74 74
             ->method('translate')
75
-            ->with($this->callback(function ($string) {
75
+            ->with($this->callback(function($string) {
76 76
                 return is_string($string);
77 77
             }))
78 78
             ->willReturn($expected);
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Entity/StatusTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@
 block discarded – undo
52 52
     public function provideCreatingInstancesTestData()
53 53
     {
54 54
         return array(
55
-            array(Status::CREATED,              Status::CREATED               , 10),
56
-            array(Status::WAITING_FOR_APPROVAL, Status::WAITING_FOR_APPROVAL  , 20),
57
-            array(Status::REJECTED,             Status::REJECTED              , 30),
58
-            array(Status::PUBLISH,              Status::PUBLISH               , 40),
59
-            array(Status::ACTIVE,               Status::ACTIVE                , 50),
60
-            array(Status::INACTIVE,             Status::INACTIVE              , 60),
61
-            array(Status::EXPIRED,              Status::EXPIRED               , 70),
55
+            array(Status::CREATED, Status::CREATED, 10),
56
+            array(Status::WAITING_FOR_APPROVAL, Status::WAITING_FOR_APPROVAL, 20),
57
+            array(Status::REJECTED, Status::REJECTED, 30),
58
+            array(Status::PUBLISH, Status::PUBLISH, 40),
59
+            array(Status::ACTIVE, Status::ACTIVE, 50),
60
+            array(Status::INACTIVE, Status::INACTIVE, 60),
61
+            array(Status::EXPIRED, Status::EXPIRED, 70),
62 62
         );
63 63
     }
64 64
 
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Entity/Decorator/JsonLdProviderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
         ]
54 54
     ];
55 55
 
56
-    private $inheritance = [ JsonLdProviderInterface::class ];
56
+    private $inheritance = [JsonLdProviderInterface::class];
57 57
 
58
-    private function getJob($withOrganization=true, $withDatePublishStart=true, $withSalary=false)
58
+    private function getJob($withOrganization = true, $withDatePublishStart = true, $withSalary = false)
59 59
     {
60 60
         $job = new Job();
61 61
         $organization = new Organization();
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Entity/HistoryTest.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     
94 94
     
95 95
     /**
96
-    * @covers \Jobs\Entity\History::setDate
97
-    * @covers \Jobs\Entity\History::getDate
98
-    */
96
+     * @covers \Jobs\Entity\History::setDate
97
+     * @covers \Jobs\Entity\History::getDate
98
+     */
99 99
     public function testSetGetDate()
100 100
     {
101 101
         $date=new \DateTime("2017-02-28 11:11:11");
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
     }
106 106
     
107 107
     /**
108
-    * @covers \Jobs\Entity\History::setMessage
109
-    * @covers \Jobs\Entity\History::getMessage
110
-    */
108
+     * @covers \Jobs\Entity\History::setMessage
109
+     * @covers \Jobs\Entity\History::getMessage
110
+     */
111 111
     public function testSetGetMessage()
112 112
     {
113 113
         $message="my message";
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
     }
118 118
     
119 119
     /**
120
-    * @covers \Jobs\Entity\History::setStatus
121
-    * @covers \Jobs\Entity\History::getStatus
122
-    */
120
+     * @covers \Jobs\Entity\History::setStatus
121
+     * @covers \Jobs\Entity\History::getStatus
122
+     */
123 123
     public function testSetGetStatus()
124 124
     {
125 125
         $status=new Status(Status::CREATED);
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Entity/ClassificationsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
     private $target = Classifications::class;
36 36
 
37
-    private $inheritance = [ EntityInterface::class ];
37
+    private $inheritance = [EntityInterface::class];
38 38
 
39
-    private $traits = [ EntityTrait::class ];
39
+    private $traits = [EntityTrait::class];
40 40
 
41 41
     public function propertiesProvider()
42 42
     {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $profs = new EmbeddedLeafs();
45 45
         return [
46 46
             ['employmentTypes', ['value' => $types, 'default@' => EmbeddedLeafs::class]],
47
-            ['professions',  ['value' => $profs, 'default@' => EmbeddedLeafs::class]],
47
+            ['professions', ['value' => $profs, 'default@' => EmbeddedLeafs::class]],
48 48
         ];
49 49
     }
50 50
 }
Please login to merge, or discard this patch.