@@ -61,14 +61,14 @@ |
||
61 | 61 | return $this->useDefaultValidation ? \Laminas\Form\Form::isValid() : parent::isValid(); |
62 | 62 | } |
63 | 63 | |
64 | - /** |
|
65 | - * @param bool $bool |
|
66 | - * @return SocialProfiles |
|
67 | - */ |
|
68 | - public function setUseDefaultValidation($bool) |
|
69 | - { |
|
70 | - $this->useDefaultValidation = (bool)$bool; |
|
64 | + /** |
|
65 | + * @param bool $bool |
|
66 | + * @return SocialProfiles |
|
67 | + */ |
|
68 | + public function setUseDefaultValidation($bool) |
|
69 | + { |
|
70 | + $this->useDefaultValidation = (bool)$bool; |
|
71 | 71 | |
72 | - return $this; |
|
73 | - } |
|
72 | + return $this; |
|
73 | + } |
|
74 | 74 | } |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | $acl = new Acl(); |
87 | 87 | |
88 | 88 | $events = $this->getMockBuilder('\Laminas\EventManager\EventManager') |
89 | - ->disableOriginalConstructor() |
|
90 | - ->getMock(); |
|
89 | + ->disableOriginalConstructor() |
|
90 | + ->getMock(); |
|
91 | 91 | |
92 | 92 | $events->expects($this->once()) |
93 | - ->method('triggerUntil') |
|
94 | - ->willReturn(new ResponseCollection()); |
|
93 | + ->method('triggerUntil') |
|
94 | + ->willReturn(new ResponseCollection()); |
|
95 | 95 | |
96 | 96 | $target->setEventManager($events); |
97 | 97 | |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | $responseFalse = $this->createResponseMock(false); |
114 | 114 | |
115 | 115 | $events = $this->getMockBuilder('\Laminas\EventManager\EventManager') |
116 | - ->disableOriginalConstructor() |
|
117 | - ->getMock(); |
|
116 | + ->disableOriginalConstructor() |
|
117 | + ->getMock(); |
|
118 | 118 | |
119 | 119 | $events->expects($this->exactly(5)) |
120 | - ->method('triggerUntil') |
|
121 | - ->will($this->onConsecutiveCalls($responseNull, $responseEmpty, $responseZero, $responseTrue, $responseFalse)); |
|
120 | + ->method('triggerUntil') |
|
121 | + ->will($this->onConsecutiveCalls($responseNull, $responseEmpty, $responseZero, $responseTrue, $responseFalse)); |
|
122 | 122 | |
123 | 123 | $target->setEventManager($events); |
124 | 124 | |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | protected function createResponseMock($returnValue) |
135 | 135 | { |
136 | 136 | $response = $this->getMockBuilder('\Laminas\EventManager\ResponseCollection') |
137 | - ->disableOriginalConstructor() |
|
138 | - ->getMock(); |
|
137 | + ->disableOriginalConstructor() |
|
138 | + ->getMock(); |
|
139 | 139 | $response->method('last')->willReturn($returnValue); |
140 | 140 | |
141 | 141 | return $response; |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | $target = new TargetMock(); |
147 | 147 | |
148 | 148 | $events = $this->getMockBuilder('\Laminas\EventManager\EventManager') |
149 | - ->disableOriginalConstructor() |
|
150 | - ->getMock(); |
|
149 | + ->disableOriginalConstructor() |
|
150 | + ->getMock(); |
|
151 | 151 | |
152 | 152 | $acl = new Acl(); |
153 | 153 | $role = new GenericRole('testRole'); |
@@ -156,16 +156,16 @@ discard block |
||
156 | 156 | $self = $this; |
157 | 157 | |
158 | 158 | $events->expects($this->once())->method('triggerUntil') |
159 | - ->will($this->returnCallback(function ($callback, $eventName, $event) use ($acl, $role, $resource, $privilege, $self) { |
|
160 | - $self->assertTrue(is_callable($callback)); |
|
161 | - $self->assertEquals('assert', $eventName); |
|
162 | - $self->assertSame($acl, $event->getAcl()); |
|
163 | - $self->assertSame($role, $event->getRole()); |
|
164 | - $self->assertSame($resource, $event->getResource()); |
|
165 | - $self->assertSame($privilege, $event->getPrivilege()); |
|
166 | - |
|
167 | - return new ResponseCollection(); |
|
168 | - })); |
|
159 | + ->will($this->returnCallback(function ($callback, $eventName, $event) use ($acl, $role, $resource, $privilege, $self) { |
|
160 | + $self->assertTrue(is_callable($callback)); |
|
161 | + $self->assertEquals('assert', $eventName); |
|
162 | + $self->assertSame($acl, $event->getAcl()); |
|
163 | + $self->assertSame($role, $event->getRole()); |
|
164 | + $self->assertSame($resource, $event->getResource()); |
|
165 | + $self->assertSame($privilege, $event->getPrivilege()); |
|
166 | + |
|
167 | + return new ResponseCollection(); |
|
168 | + })); |
|
169 | 169 | |
170 | 170 | $target->setEventManager($events); |
171 | 171 | $target->assert($acl, $role, $resource, $privilege); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | public function testCreateServiceReturnsAssertionManager() |
33 | 33 | { |
34 | 34 | $services = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager') |
35 | - ->disableOriginalConstructor() |
|
36 | - ->getMock(); |
|
35 | + ->disableOriginalConstructor() |
|
36 | + ->getMock(); |
|
37 | 37 | |
38 | 38 | $services->expects($this->once())->method('get')->with('Config') |
39 | - ->willReturn(array()); |
|
39 | + ->willReturn(array()); |
|
40 | 40 | |
41 | 41 | $target = new AssertionManagerFactory(); |
42 | 42 | $manager = $target->__invoke($services, AssertionManager::class); |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | public function testCorrectConfigIsUsedToConfigureTheManager($config, $testName, $testResult) |
55 | 55 | { |
56 | 56 | $services = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager') |
57 | - ->disableOriginalConstructor() |
|
58 | - ->getMock(); |
|
57 | + ->disableOriginalConstructor() |
|
58 | + ->getMock(); |
|
59 | 59 | |
60 | 60 | $services->expects($this->once())->method('get')->with('Config') |
61 | - ->willReturn($config); |
|
61 | + ->willReturn($config); |
|
62 | 62 | |
63 | 63 | $target = new AssertionManagerFactory(); |
64 | 64 |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | $events = $this->getMockBuilder('\Laminas\EventManager\EventManager')->disableOriginalConstructor()->getMock(); |
44 | 44 | $events->expects($this->once()) |
45 | - ->method('attach')->with(MvcEvent::EVENT_DISPATCH_ERROR, [ $target, 'onDispatchError' ]) |
|
46 | - ->willReturn('worked'); |
|
45 | + ->method('attach')->with(MvcEvent::EVENT_DISPATCH_ERROR, [ $target, 'onDispatchError' ]) |
|
46 | + ->willReturn('worked'); |
|
47 | 47 | |
48 | 48 | $this->assertSame($target, $target->attach($events), 'Fluent interface broken'); |
49 | 49 | $this->assertAttributeEquals(['worked'], 'listeners', $target); |
@@ -52,15 +52,15 @@ discard block |
||
52 | 52 | public function provideTestData() |
53 | 53 | { |
54 | 54 | return [ |
55 | - [ true, true, true, true ], |
|
56 | - [ false, true, true, false ], |
|
57 | - [ true, false, true, false ], |
|
58 | - [ true, true, false, false ], |
|
59 | - [ false, false, true, false ], |
|
60 | - [ false, true, false, false ], |
|
61 | - [ true, false, false, false ], |
|
62 | - [ false, false, false, false ], |
|
63 | - ]; |
|
55 | + [ true, true, true, true ], |
|
56 | + [ false, true, true, false ], |
|
57 | + [ true, false, true, false ], |
|
58 | + [ true, true, false, false ], |
|
59 | + [ false, false, true, false ], |
|
60 | + [ false, true, false, false ], |
|
61 | + [ true, false, false, false ], |
|
62 | + [ false, false, false, false ], |
|
63 | + ]; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | $event = $this->getMockBuilder('\Laminas\Mvc\MvcEvent')->disableOriginalConstructor()->getMock(); |
81 | 81 | |
82 | 82 | $event->expects($this->once()) |
83 | - ->method('getParam')->with('exception') |
|
84 | - ->willReturn($exception); |
|
83 | + ->method('getParam')->with('exception') |
|
84 | + ->willReturn($exception); |
|
85 | 85 | |
86 | 86 | if ($useValidModel) { |
87 | 87 | $model = $this->getMockBuilder('\Laminas\View\Model\ViewModel')->disableOriginalConstructor()->getMock(); |
@@ -91,16 +91,16 @@ discard block |
||
91 | 91 | $model->expects($this->never())->method('setTemplate'); |
92 | 92 | } |
93 | 93 | $event->expects($this->once()) |
94 | - ->method('getError') |
|
95 | - ->willReturn($useValidError ? Application::ERROR_EXCEPTION : 'NotMatchError'); |
|
94 | + ->method('getError') |
|
95 | + ->willReturn($useValidError ? Application::ERROR_EXCEPTION : 'NotMatchError'); |
|
96 | 96 | } else { |
97 | 97 | $model = 'not a view model instance'; |
98 | 98 | $event->expects($this->never())->method('getError'); |
99 | 99 | } |
100 | 100 | |
101 | 101 | $event->expects($this->once()) |
102 | - ->method('getResult') |
|
103 | - ->willReturn($model); |
|
102 | + ->method('getResult') |
|
103 | + ->willReturn($model); |
|
104 | 104 | |
105 | 105 | $target->onDispatchError($event); |
106 | 106 | } |
@@ -45,22 +45,22 @@ |
||
45 | 45 | |
46 | 46 | |
47 | 47 | $callback = $this->getMockBuilder('\Laminas\Stdlib\CallbackHandler') |
48 | - ->disableOriginalConstructor() |
|
49 | - ->getMock(); |
|
48 | + ->disableOriginalConstructor() |
|
49 | + ->getMock(); |
|
50 | 50 | |
51 | 51 | $events = $this->getMockBuilder('\Laminas\EventManager\SharedEventManagerInterface') |
52 | - ->setMethods(array('attach')) |
|
53 | - ->getMockForAbstractClass(); |
|
52 | + ->setMethods(array('attach')) |
|
53 | + ->getMockForAbstractClass(); |
|
54 | 54 | |
55 | 55 | $events->expects($this->once()) |
56 | - ->method('attach') |
|
57 | - ->with($expId, $expEvent, $expCallback, $expPriority) |
|
58 | - ->willReturn($expCallback); |
|
56 | + ->method('attach') |
|
57 | + ->with($expId, $expEvent, $expCallback, $expPriority) |
|
58 | + ->willReturn($expCallback); |
|
59 | 59 | |
60 | 60 | $events->expects($this->once()) |
61 | - ->method('detach') |
|
62 | - ->with($expCallback, 'Laminas\Mvc\Application') |
|
63 | - ->willReturn(true); |
|
61 | + ->method('detach') |
|
62 | + ->with($expCallback, 'Laminas\Mvc\Application') |
|
63 | + ->willReturn(true); |
|
64 | 64 | |
65 | 65 | |
66 | 66 | $target->attachShared($events); |
@@ -54,8 +54,8 @@ |
||
54 | 54 | |
55 | 55 | |
56 | 56 | $this->serviceMock = $this->getMockBuilder('Auth\Service\Register') |
57 | - ->disableOriginalConstructor() |
|
58 | - ->getMock(); |
|
57 | + ->disableOriginalConstructor() |
|
58 | + ->getMock(); |
|
59 | 59 | |
60 | 60 | |
61 | 61 | $this->paramsMock = $this->getMockBuilder('Laminas\Mvc\Controller\Plugin\Params') |
@@ -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 Laminas\ServiceManager\Config. |
|
73 | - // 'service_manager' => array(), |
|
71 | + // Initial configuration with which to seed the ServiceManager. |
|
72 | + // Should be compatible with Laminas\ServiceManager\Config. |
|
73 | + // 'service_manager' => array(), |
|
74 | 74 | ); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // ), |
65 | 65 | // ) |
66 | 66 | |
67 | - // Initial configuration with which to seed the ServiceManager. |
|
68 | - // Should be compatible with Laminas\ServiceManager\Config. |
|
69 | - // 'service_manager' => array(), |
|
67 | + // Initial configuration with which to seed the ServiceManager. |
|
68 | + // Should be compatible with Laminas\ServiceManager\Config. |
|
69 | + // 'service_manager' => array(), |
|
70 | 70 | ); |
@@ -208,13 +208,13 @@ discard block |
||
208 | 208 | return $this->email; |
209 | 209 | } |
210 | 210 | |
211 | - /** |
|
212 | - * @return bool |
|
213 | - */ |
|
214 | - public function getOneClickApply() |
|
215 | - { |
|
216 | - return $this->oneClickApply; |
|
217 | - } |
|
211 | + /** |
|
212 | + * @return bool |
|
213 | + */ |
|
214 | + public function getOneClickApply() |
|
215 | + { |
|
216 | + return $this->oneClickApply; |
|
217 | + } |
|
218 | 218 | |
219 | 219 | |
220 | 220 | /** |
@@ -222,29 +222,29 @@ discard block |
||
222 | 222 | * |
223 | 223 | * @return $this |
224 | 224 | */ |
225 | - public function setOneClickApply($oneClickApply) |
|
226 | - { |
|
227 | - $this->oneClickApply = (bool)$oneClickApply; |
|
228 | - |
|
229 | - return $this; |
|
230 | - } |
|
231 | - |
|
232 | - /** |
|
233 | - * @return array |
|
234 | - */ |
|
235 | - public function getOneClickApplyProfiles() |
|
236 | - { |
|
237 | - return $this->oneClickApplyProfiles; |
|
238 | - } |
|
239 | - |
|
240 | - /** |
|
241 | - * @param array $oneClickApplyProfiles |
|
242 | - * @return AtsMode |
|
243 | - */ |
|
244 | - public function setOneClickApplyProfiles(array $oneClickApplyProfiles) |
|
245 | - { |
|
246 | - $this->oneClickApplyProfiles = $oneClickApplyProfiles; |
|
247 | - |
|
248 | - return $this; |
|
249 | - } |
|
225 | + public function setOneClickApply($oneClickApply) |
|
226 | + { |
|
227 | + $this->oneClickApply = (bool)$oneClickApply; |
|
228 | + |
|
229 | + return $this; |
|
230 | + } |
|
231 | + |
|
232 | + /** |
|
233 | + * @return array |
|
234 | + */ |
|
235 | + public function getOneClickApplyProfiles() |
|
236 | + { |
|
237 | + return $this->oneClickApplyProfiles; |
|
238 | + } |
|
239 | + |
|
240 | + /** |
|
241 | + * @param array $oneClickApplyProfiles |
|
242 | + * @return AtsMode |
|
243 | + */ |
|
244 | + public function setOneClickApplyProfiles(array $oneClickApplyProfiles) |
|
245 | + { |
|
246 | + $this->oneClickApplyProfiles = $oneClickApplyProfiles; |
|
247 | + |
|
248 | + return $this; |
|
249 | + } |
|
250 | 250 | } |