Passed
Push — master ( 793370...b09d10 )
by Carsten
12:59
created
module/Cv/test/CvTest/Entity/CvTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,11 +83,11 @@
 block discarded – undo
83 83
             [ 'status', ['value' => new Status(), 'default' => new Status() ]],
84 84
             [ 'status', ['value' => Status::NONPUBLIC, 'expect' => '@' . Status::class]],
85 85
             [ 'status', ['value' => Status::PUBLIC_TO_ALL, 'ignore_getter' => true,
86
-                         'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }]
86
+                            'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }]
87 87
             ],
88 88
             [ 'status', ['value' => Status::NONPUBLIC, 'ignore_getter' => true,
89
-                         'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); },
90
-                         'post' => function() use ($permissions2) { $permissions2->__phpunit_verify(); }]
89
+                            'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); },
90
+                            'post' => function() use ($permissions2) { $permissions2->__phpunit_verify(); }]
91 91
             ],
92 92
             [ 'attachments', $defaultOptions],
93 93
             [ 'user', ['value' => new User(), 'ignore_getter' => true,
Please login to merge, or discard this patch.
module/Cv/test/CvTest/Form/SearchFormTest.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -65,41 +65,41 @@
 block discarded – undo
65 65
                 ['cv-list-filter']
66 66
             );
67 67
         $add1 = [
68
-                 'name' => 'l',
69
-                 'type' => 'LocationSelect',
70
-                 'options' => [
71
-                     'label' => 'Location',
72
-                     'span' => 3,
73
-                     'location_entity' => \Cv\Entity\Location::class,
74
-                 ],
75
-                 'attributes' => [
76
-                     'data-width' => '100%',
77
-                 ],
78
-             ];
68
+                    'name' => 'l',
69
+                    'type' => 'LocationSelect',
70
+                    'options' => [
71
+                        'label' => 'Location',
72
+                        'span' => 3,
73
+                        'location_entity' => \Cv\Entity\Location::class,
74
+                    ],
75
+                    'attributes' => [
76
+                        'data-width' => '100%',
77
+                    ],
78
+                ];
79 79
 
80 80
         $add2 = [
81
-                 'name' => 'd',
82
-                 'type' => 'Core\Form\Element\Select',
83
-                 'options' => [
84
-                     'label' => /*@translate*/ 'Distance',
85
-                     'value_options' => [
86
-                         '5' => '5 km',
87
-                         '10' => '10 km',
88
-                         '20' => '20 km',
89
-                         '50' => '50 km',
90
-                         '100' => '100 km'
91
-                     ],
92
-                     'span' => 4,
81
+                    'name' => 'd',
82
+                    'type' => 'Core\Form\Element\Select',
83
+                    'options' => [
84
+                        'label' => /*@translate*/ 'Distance',
85
+                        'value_options' => [
86
+                            '5' => '5 km',
87
+                            '10' => '10 km',
88
+                            '20' => '20 km',
89
+                            '50' => '50 km',
90
+                            '100' => '100 km'
91
+                        ],
92
+                        'span' => 4,
93 93
 
94
-                 ],
95
-                 'attributes' => [
96
-                     'value' => '10',
97
-                     'data-searchbox' => -1,
98
-                     'data-allowclear' => 'false',
99
-                     'data-placeholder' => 'Distance',
100
-                     'data-width' => '100%',
101
-                 ]
102
-             ];
94
+                    ],
95
+                    'attributes' => [
96
+                        'value' => '10',
97
+                        'data-searchbox' => -1,
98
+                        'data-allowclear' => 'false',
99
+                        'data-placeholder' => 'Distance',
100
+                        'data-width' => '100%',
101
+                    ]
102
+                ];
103 103
 
104 104
         $this->target->expects($this->exactly(2))->method('add')
105 105
             ->withConsecutive(
Please login to merge, or discard this patch.
module/Cv/test/CvTest/Form/EducationFieldsetTest.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -77,61 +77,61 @@
 block discarded – undo
77 77
                 ]
78 78
             ],
79 79
             [
80
-                 'type' => 'Core/Datepicker',
81
-                 'name' => 'endDate',
82
-                 'options' => [
83
-                     'label' => 'End date'
84
-                 ],
80
+                    'type' => 'Core/Datepicker',
81
+                    'name' => 'endDate',
82
+                    'options' => [
83
+                        'label' => 'End date'
84
+                    ],
85 85
             ],
86
-             [
87
-                 'type' => 'checkbox',
88
-                 'name' => 'currentIndicator',
89
-                 'options' => [
90
-                     'label' => 'ongoing'
91
-                 ]
92
-             ],
93
-             [
94
-                 'name' => 'competencyName',
95
-                 'options' => [
96
-                     'label' => 'Degree'],
97
-                 'attributes' => [
98
-                     'title' =>  'please enter the name of your qualification'
99
-                 ],
100
-             ],
101
-             [
102
-                 'name' => 'organizationName',
103
-                 'options' => [
104
-                     'label' => 'Organization Name'],
105
-                 'attributes' => [
106
-                     'title' =>  'please enter the name of the university or school'
107
-                 ],
108
-             ],
86
+                [
87
+                    'type' => 'checkbox',
88
+                    'name' => 'currentIndicator',
89
+                    'options' => [
90
+                        'label' => 'ongoing'
91
+                    ]
92
+                ],
93
+                [
94
+                    'name' => 'competencyName',
95
+                    'options' => [
96
+                        'label' => 'Degree'],
97
+                    'attributes' => [
98
+                        'title' =>  'please enter the name of your qualification'
99
+                    ],
100
+                ],
101
+                [
102
+                    'name' => 'organizationName',
103
+                    'options' => [
104
+                        'label' => 'Organization Name'],
105
+                    'attributes' => [
106
+                        'title' =>  'please enter the name of the university or school'
107
+                    ],
108
+                ],
109 109
             [
110
-                 'name' => 'country',
111
-                 'options' => [
112
-                     'label' => 'Country'],
113
-                 'attributes' => [
114
-                     'title' => /*@translate */ 'please select the country'
115
-                 ],
116
-             ],
117
-             [
118
-                 'name' => 'city',
119
-                 'options' => [
120
-                     'label' => 'City'],
121
-                 'attributes' => [
122
-                     'title' => 'please enter the name of the city'
123
-                 ],
124
-             ],
125
-             [
126
-                 'name' => 'description',
127
-                 'type' => 'Zend\Form\Element\Textarea',
128
-                 'options' => [
129
-                     'label' => 'Description',
130
-                 ],
131
-                 'attributes' => [
132
-                     'title' => 'please enter a description',
133
-                 ],
134
-             ],
110
+                    'name' => 'country',
111
+                    'options' => [
112
+                        'label' => 'Country'],
113
+                    'attributes' => [
114
+                        'title' => /*@translate */ 'please select the country'
115
+                    ],
116
+                ],
117
+                [
118
+                    'name' => 'city',
119
+                    'options' => [
120
+                        'label' => 'City'],
121
+                    'attributes' => [
122
+                        'title' => 'please enter the name of the city'
123
+                    ],
124
+                ],
125
+                [
126
+                    'name' => 'description',
127
+                    'type' => 'Zend\Form\Element\Textarea',
128
+                    'options' => [
129
+                        'label' => 'Description',
130
+                    ],
131
+                    'attributes' => [
132
+                        'title' => 'please enter a description',
133
+                    ],
134
+                ],
135 135
         ];
136 136
 
137 137
         $addArgValidator = function($arg) use ($add) {
Please login to merge, or discard this patch.
module/Cv/test/CvTest/Form/EmploymentFieldsetTest.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -75,37 +75,37 @@
 block discarded – undo
75 75
                 ]
76 76
             ],
77 77
             [
78
-                 'type' => 'Core/Datepicker',
79
-                 'name' => 'endDate',
80
-                 'options' => [
81
-                     'label' => 'End date'
82
-                 ],
78
+                    'type' => 'Core/Datepicker',
79
+                    'name' => 'endDate',
80
+                    'options' => [
81
+                        'label' => 'End date'
82
+                    ],
83 83
             ],
84
-             [
85
-                 'type' => 'checkbox',
86
-                 'name' => 'currentIndicator',
87
-                 'options' => [
88
-                     'label' => 'ongoing'
89
-                 ]
90
-             ],
91
-             [
92
-                 'name' => 'organizationName',
93
-                 'options' => [
94
-                     'label' => 'Company Name'],
95
-                 'attributes' => [
96
-                     'title' =>  'please enter the name of the company'
97
-                 ],
98
-             ],
99
-             [
100
-                 'name' => 'description',
101
-                 'type' => 'Zend\Form\Element\Textarea',
102
-                 'options' => [
103
-                     'label' => 'Description',
104
-                 ],
105
-                 'attributes' => [
106
-                     'title' => 'please describe your position',
107
-                 ],
108
-             ],
84
+                [
85
+                    'type' => 'checkbox',
86
+                    'name' => 'currentIndicator',
87
+                    'options' => [
88
+                        'label' => 'ongoing'
89
+                    ]
90
+                ],
91
+                [
92
+                    'name' => 'organizationName',
93
+                    'options' => [
94
+                        'label' => 'Company Name'],
95
+                    'attributes' => [
96
+                        'title' =>  'please enter the name of the company'
97
+                    ],
98
+                ],
99
+                [
100
+                    'name' => 'description',
101
+                    'type' => 'Zend\Form\Element\Textarea',
102
+                    'options' => [
103
+                        'label' => 'Description',
104
+                    ],
105
+                    'attributes' => [
106
+                        'title' => 'please describe your position',
107
+                    ],
108
+                ],
109 109
         ];
110 110
 
111 111
         $addArgValidator = function($arg) use ($add) {
Please login to merge, or discard this patch.
module/Cv/test/CvTest/Form/PreferredJobFieldsetTest.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -77,76 +77,76 @@
 block discarded – undo
77 77
     public function testInitializesItself()
78 78
     {
79 79
         $add = [
80
-                 [
81
-                     'name' => 'typeOfApplication',
82
-                     'type' => 'select',
83
-                     'options' => [
84
-                         'value_options' => $this->attributes['typeOfApplicationOptions'],
85
-                         'label' =>  'desired type of work',
86
-                         'description' =>  'Do you want to work permanently or temporary?',
87
-                     ],
88
-                     'attributes' => [
89
-                         'title' =>  'please describe your position',
90
-                         'description' => 'what kind of ',
91
-                         'data-placeholder' =>  'please select',
92
-                         'data-allowclear' => 'false',
93
-                         'data-searchbox' => -1,
94
-                         'multiple' => true,
95
-                         'data-width' => '100%',
96
-                     ],
97
-                 ],
80
+                    [
81
+                        'name' => 'typeOfApplication',
82
+                        'type' => 'select',
83
+                        'options' => [
84
+                            'value_options' => $this->attributes['typeOfApplicationOptions'],
85
+                            'label' =>  'desired type of work',
86
+                            'description' =>  'Do you want to work permanently or temporary?',
87
+                        ],
88
+                        'attributes' => [
89
+                            'title' =>  'please describe your position',
90
+                            'description' => 'what kind of ',
91
+                            'data-placeholder' =>  'please select',
92
+                            'data-allowclear' => 'false',
93
+                            'data-searchbox' => -1,
94
+                            'multiple' => true,
95
+                            'data-width' => '100%',
96
+                        ],
97
+                    ],
98 98
 
99
-             [
100
-                 'name' => 'desiredJob',
101
-                 'type' => 'Text',
102
-                 'options' => [
103
-                     'label' =>  'desired job position',
104
-                     'description' =>  'Enter the title of your desired job. Eg. "Software Developer" or "Customer Service Representative"',
105
-                 ],
106
-                 'attributes' => [
107
-                     'title' =>  'please describe your position',
108
-                 ],
109
-             ],
110
-             [
111
-                 'name' => 'desiredLocations',
112
-                 'type' => 'LocationSelect',
113
-                 'options' => [
114
-                     'label' =>  'desired job location',
115
-                     'description' =>  'Where do you want to work?',
116
-                     'location_entity' => new Location(),
117
-                 ],
118
-                 'attributes' => [
119
-                     'title' =>  'please describe your position',
120
-                     'multiple' => true,
121
-                     'data-width' => '100%',
122
-                 ],
123
-             ],
124
-             [
125
-                 'name' => 'willingnessToTravel',
126
-                 'type' => 'Select',
127
-                 'options' => [
128
-                     'value_options' => $this->attributes['willingnessToTravelOptions'],
129
-                     'label' =>  'Willingness to travel',
130
-                     'description' =>  'Enter your willingness to travel.',
131
-                 ],
132
-                 'attributes' => [
133
-                     'data-placeholder' =>  'please select',
134
-                     'data-allowclear' => 'false',
135
-                     'data-searchbox' => -1,
136
-                     'data-width' => '100%'
137
-                 ],
138
-             ],
139
-             [
140
-                 'name' => 'expectedSalary',
141
-                 'type' => 'Text',
142
-                 'options' => [
143
-                     'label' =>  'expected Salary',
144
-                     'description' =>  'What is your expected Salary?',
145
-                 ],
146
-                 'attributes' => [
147
-                     'title' =>  'please describe your position',
148
-                 ],
149
-             ],
99
+                [
100
+                    'name' => 'desiredJob',
101
+                    'type' => 'Text',
102
+                    'options' => [
103
+                        'label' =>  'desired job position',
104
+                        'description' =>  'Enter the title of your desired job. Eg. "Software Developer" or "Customer Service Representative"',
105
+                    ],
106
+                    'attributes' => [
107
+                        'title' =>  'please describe your position',
108
+                    ],
109
+                ],
110
+                [
111
+                    'name' => 'desiredLocations',
112
+                    'type' => 'LocationSelect',
113
+                    'options' => [
114
+                        'label' =>  'desired job location',
115
+                        'description' =>  'Where do you want to work?',
116
+                        'location_entity' => new Location(),
117
+                    ],
118
+                    'attributes' => [
119
+                        'title' =>  'please describe your position',
120
+                        'multiple' => true,
121
+                        'data-width' => '100%',
122
+                    ],
123
+                ],
124
+                [
125
+                    'name' => 'willingnessToTravel',
126
+                    'type' => 'Select',
127
+                    'options' => [
128
+                        'value_options' => $this->attributes['willingnessToTravelOptions'],
129
+                        'label' =>  'Willingness to travel',
130
+                        'description' =>  'Enter your willingness to travel.',
131
+                    ],
132
+                    'attributes' => [
133
+                        'data-placeholder' =>  'please select',
134
+                        'data-allowclear' => 'false',
135
+                        'data-searchbox' => -1,
136
+                        'data-width' => '100%'
137
+                    ],
138
+                ],
139
+                [
140
+                    'name' => 'expectedSalary',
141
+                    'type' => 'Text',
142
+                    'options' => [
143
+                        'label' =>  'expected Salary',
144
+                        'description' =>  'What is your expected Salary?',
145
+                    ],
146
+                    'attributes' => [
147
+                        'title' =>  'please describe your position',
148
+                    ],
149
+                ],
150 150
         ];
151 151
 
152 152
         $callCount = count($add);
Please login to merge, or discard this patch.
module/Cv/test/TestConfig.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $modules = array_merge(
3
-	include_once __DIR__.'/../../../config/common.modules.php',
4
-	[
5
-		'Install',
6
-		'Core',
7
-		'Auth',
8
-		'Jobs',
9
-		'Geo',
10
-		'Cv',
11
-		'Settings',
12
-		'Applications',
13
-		'Organizations',
14
-	]
3
+    include_once __DIR__.'/../../../config/common.modules.php',
4
+    [
5
+        'Install',
6
+        'Core',
7
+        'Auth',
8
+        'Jobs',
9
+        'Geo',
10
+        'Cv',
11
+        'Settings',
12
+        'Applications',
13
+        'Organizations',
14
+    ]
15 15
 );
16 16
 return array(
17 17
     // This should be an array of module namespaces used in the application.
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         // modules are loaded. These effectively overide configuration
33 33
         // provided by modules themselves. Paths may use GLOB_BRACE notation.
34 34
         'config_glob_paths' => array(
35
-              __DIR__  . '/../../../test/config/{,*.}{global,local}.php',
35
+                __DIR__  . '/../../../test/config/{,*.}{global,local}.php',
36 36
         ),
37 37
 
38 38
         // Whether or not to enable a configuration cache.
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     //     ),
71 71
     // )
72 72
 
73
-   // Initial configuration with which to seed the ServiceManager.
74
-   // Should be compatible with Zend\ServiceManager\Config.
75
-   // 'service_manager' => array(),
73
+    // Initial configuration with which to seed the ServiceManager.
74
+    // Should be compatible with Zend\ServiceManager\Config.
75
+    // 'service_manager' => array(),
76 76
 );
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/Strategy/IdleSleepStrategyTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     {
47 47
         $events = $this->prophesize(EventManagerInterface::class);
48 48
         $events->attach(AbstractWorkerEvent::EVENT_PROCESS_IDLE, [$this->target, 'onIdle'], 1)
49
-               ->willReturn('handle')
50
-               ->shouldBeCalled();
49
+                ->willReturn('handle')
50
+                ->shouldBeCalled();
51 51
 
52 52
         $this->target->attach($events->reveal());
53 53
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/MongoQueueTest.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
             'delay' => 100,
153 153
         ];
154 154
         $resultMock = $this->getMockBuilder(\MongoDB\InsertOneResult::class)->disableOriginalConstructor()
155
-                           ->setMethods(['getInsertedId'])->getMock();
155
+                            ->setMethods(['getInsertedId'])->getMock();
156 156
         $resultMock->expects($this->once())->method('getInsertedId')->willReturn('ID');
157 157
         $this->mongoCollectionMock->expects($this->once())->method('insertOne')
158
-                                  ->with($this->callback(function($value) use ($options) {
158
+                                    ->with($this->callback(function($value) use ($options) {
159 159
 
160
-                                      return isset($value['queue']) && $value['queue'] == $this->queueName
160
+                                        return isset($value['queue']) && $value['queue'] == $this->queueName
161 161
                                              && isset($value['status']) && $value['status'] == MongoQueue::STATUS_PENDING
162 162
                                              && !isset($value['tried'])
163 163
                                              && !isset($value['message']) && !isset($value['trace'])
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
                                              && $value['created'] instanceOf \MongoDB\BSON\UTCDateTime
167 167
                                              && (int) ((string) $value['scheduled']) - (int) ((string)$value['created']) == $options['delay'] * 1000
168 168
                                              && isset($value['priority']) && $value['priority'] == $options['priority']
169
-                                          ;
170
-                                  }))
171
-                                  ->willReturn($resultMock);
169
+                                            ;
170
+                                    }))
171
+                                    ->willReturn($resultMock);
172 172
 
173 173
         $this->target->push($job, $options);
174 174
 
@@ -184,17 +184,17 @@  discard block
 block discarded – undo
184 184
 
185 185
 
186 186
         $this->mongoCollectionMock->expects($this->once())->method('findOneAndUpdate')
187
-                                  ->with(
188
-                                      $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
189
-                                      $this->callback(function($value) {
190
-                                          if (!array_key_exists('$set', $value)) { return false;}
191
-                                          $value = $value['$set'];
187
+                                    ->with(
188
+                                        $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
189
+                                        $this->callback(function($value) {
190
+                                            if (!array_key_exists('$set', $value)) { return false;}
191
+                                            $value = $value['$set'];
192 192
                                         return isset($value['tried']) && $value['tried'] == 10
193 193
                                                 && !array_key_exists('created', $value)
194 194
                                         ;
195
-                                      }
196
-                                  ))
197
-                                  ->willReturn(null);
195
+                                        }
196
+                                    ))
197
+                                    ->willReturn(null);
198 198
 
199 199
         $this->target->retry($job);
200 200
     }
@@ -211,31 +211,31 @@  discard block
 block discarded – undo
211 211
 
212 212
         $this->jobManagerMock->expects($this->once())->method('get')->with(get_class($job))->willReturn(new $this->testJobClass());
213 213
         $this->mongoCollectionMock->expects($this->once())->method('findOneAndUpdate')
214
-                                  ->with(
215
-                                      $this->callback(function($value) {
216
-                                          return
214
+                                    ->with(
215
+                                        $this->callback(function($value) {
216
+                                            return
217 217
                                                     isset($value['queue']) && $value['queue'] == $this->queueName
218 218
                                                     && isset($value['status']) && $value['status'] == MongoQueue::STATUS_PENDING
219 219
                                                     && isset($value['scheduled']['$lte']) && $value['scheduled']['$lte'] instanceOf \MongoDB\BSON\UTCDateTime
220
-                                              ;
221
-                                      }),
220
+                                                ;
221
+                                        }),
222 222
 
223
-                                      $this->callback(function($value) {
224
-                                          if (!array_key_exists('$set', $value)) { return false;}
225
-                                          $value = $value['$set'];
226
-                                          return isset($value['status']) && $value['status'] == MongoQueue::STATUS_RUNNING
223
+                                        $this->callback(function($value) {
224
+                                            if (!array_key_exists('$set', $value)) { return false;}
225
+                                            $value = $value['$set'];
226
+                                            return isset($value['status']) && $value['status'] == MongoQueue::STATUS_RUNNING
227 227
                                                  && array_key_exists('executed', $value)
228
-                                              ;
229
-                                      }
230
-                                      ),
228
+                                                ;
229
+                                        }
230
+                                        ),
231 231
 
232
-                                      $this->callback(function($value) {
233
-                                          return
232
+                                        $this->callback(function($value) {
233
+                                            return
234 234
                                             isset($value['sort']) && $value['sort'] == ['priority' => 1, 'scheduled' => 1]
235 235
                                               && isset($value['returnDocument'])&&$value['returnDocument'] = \MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER
236
-                                              ;
237
-                                      }))
238
-                                  ->willReturn($envelope);
236
+                                                ;
237
+                                        }))
238
+                                    ->willReturn($envelope);
239 239
 
240 240
         $actualJob = $this->target->pop();
241 241
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function testPopEmptyQueue()
246 246
     {
247 247
         $this->mongoCollectionMock->expects($this->once())->method('findOneAndUpdate')
248
-                                  ->willReturn(null);
248
+                                    ->willReturn(null);
249 249
 
250 250
         $actualJob = $this->target->pop();
251 251
 
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
         };
320 320
 
321 321
         $this->mongoCollectionMock->expects($this->once())->method('find')
322
-                                  ->with($filter, $opt)
323
-                                  ->willReturn($cursor);
322
+                                    ->with($filter, $opt)
323
+                                    ->willReturn($cursor);
324 324
 
325 325
         $this->target->listing($options);
326 326
 
@@ -334,19 +334,19 @@  discard block
 block discarded – undo
334 334
         $job->setId(new \MongoDB\BSON\ObjectID());
335 335
         $options = ['message' => 'test failure message'];
336 336
         $this->mongoCollectionMock->expects($this->once())->method('findOneAndUpdate')
337
-                                  ->with(
338
-                                      $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
339
-                                      $this->callback(function($value) use ($options) {
340
-                                          if (!array_key_exists('$set', $value)) { return false;}
341
-                                          $value = $value['$set'];
342
-                                          return isset($value['status']) && $value['status'] == MongoQueue::STATUS_FAILED
337
+                                    ->with(
338
+                                        $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
339
+                                        $this->callback(function($value) use ($options) {
340
+                                            if (!array_key_exists('$set', $value)) { return false;}
341
+                                            $value = $value['$set'];
342
+                                            return isset($value['status']) && $value['status'] == MongoQueue::STATUS_FAILED
343 343
                                                  && !array_key_exists('created', $value)
344 344
                                                 && !array_key_exists('scheduled', $value)
345 345
                                               && isset($value['message']) && $value['message'] == $options['message']
346
-                                              ;
347
-                                      }
348
-                                      ))
349
-                                  ->willReturn(null);
346
+                                                ;
347
+                                        }
348
+                                        ))
349
+                                    ->willReturn(null);
350 350
 
351 351
         $this->target->fail($job, $options);
352 352
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/Worker/MongoWorkerTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function testDoesDeleteJobIfProcessedSuccessfully()
73 73
     {
74
-         /* @var AbstractJob $jobMock */
74
+            /* @var AbstractJob $jobMock */
75 75
         $job = $this->prophesize(AbstractJob::class);
76 76
         $job->execute()->willReturn(ProcessJobEvent::JOB_STATUS_SUCCESS);
77 77
         $jobMock = $job->reveal();
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $options = ['delay' => 10];
92 92
 
93
-         /* @var AbstractJob $jobMock */
93
+            /* @var AbstractJob $jobMock */
94 94
         $job = $this->prophesize(AbstractJob::class);
95 95
         $job->execute()->willThrow(new RecoverableJobException('test recoverable', $options));
96 96
         $jobMock = $job->reveal();
Please login to merge, or discard this patch.