@@ -76,37 +76,37 @@ |
||
| 76 | 76 | ] |
| 77 | 77 | ], |
| 78 | 78 | [ |
| 79 | - 'type' => 'Core/Datepicker', |
|
| 80 | - 'name' => 'endDate', |
|
| 81 | - 'options' => [ |
|
| 82 | - 'label' => 'End date' |
|
| 83 | - ], |
|
| 79 | + 'type' => 'Core/Datepicker', |
|
| 80 | + 'name' => 'endDate', |
|
| 81 | + 'options' => [ |
|
| 82 | + 'label' => 'End date' |
|
| 83 | + ], |
|
| 84 | 84 | ], |
| 85 | - [ |
|
| 86 | - 'type' => 'checkbox', |
|
| 87 | - 'name' => 'currentIndicator', |
|
| 88 | - 'options' => [ |
|
| 89 | - 'label' => 'ongoing' |
|
| 90 | - ] |
|
| 91 | - ], |
|
| 92 | - [ |
|
| 93 | - 'name' => 'organizationName', |
|
| 94 | - 'options' => [ |
|
| 95 | - 'label' => 'Company Name'], |
|
| 96 | - 'attributes' => [ |
|
| 97 | - 'title' => 'please enter the name of the company' |
|
| 98 | - ], |
|
| 99 | - ], |
|
| 100 | - [ |
|
| 101 | - 'name' => 'description', |
|
| 102 | - 'type' => 'Laminas\Form\Element\Textarea', |
|
| 103 | - 'options' => [ |
|
| 104 | - 'label' => 'Description', |
|
| 105 | - ], |
|
| 106 | - 'attributes' => [ |
|
| 107 | - 'title' => 'please describe your position', |
|
| 108 | - ], |
|
| 109 | - ], |
|
| 85 | + [ |
|
| 86 | + 'type' => 'checkbox', |
|
| 87 | + 'name' => 'currentIndicator', |
|
| 88 | + 'options' => [ |
|
| 89 | + 'label' => 'ongoing' |
|
| 90 | + ] |
|
| 91 | + ], |
|
| 92 | + [ |
|
| 93 | + 'name' => 'organizationName', |
|
| 94 | + 'options' => [ |
|
| 95 | + 'label' => 'Company Name'], |
|
| 96 | + 'attributes' => [ |
|
| 97 | + 'title' => 'please enter the name of the company' |
|
| 98 | + ], |
|
| 99 | + ], |
|
| 100 | + [ |
|
| 101 | + 'name' => 'description', |
|
| 102 | + 'type' => 'Laminas\Form\Element\Textarea', |
|
| 103 | + 'options' => [ |
|
| 104 | + 'label' => 'Description', |
|
| 105 | + ], |
|
| 106 | + 'attributes' => [ |
|
| 107 | + 'title' => 'please describe your position', |
|
| 108 | + ], |
|
| 109 | + ], |
|
| 110 | 110 | ]; |
| 111 | 111 | |
| 112 | 112 | $addArgValidator = function ($arg) use ($add) { |
@@ -1,17 +1,17 @@ discard block |
||
| 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. |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // modules are loaded. These effectively overide configuration |
| 37 | 37 | // provided by modules themselves. Paths may use GLOB_BRACE notation. |
| 38 | 38 | 'config_glob_paths' => array( |
| 39 | - __DIR__ . '/../../../test/config/{,*.}{global,local}.php', |
|
| 39 | + __DIR__ . '/../../../test/config/{,*.}{global,local}.php', |
|
| 40 | 40 | ), |
| 41 | 41 | |
| 42 | 42 | // Whether or not to enable a configuration cache. |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | // ), |
| 75 | 75 | // ) |
| 76 | 76 | |
| 77 | - // Initial configuration with which to seed the ServiceManager. |
|
| 78 | - // Should be compatible with Laminas\ServiceManager\Config. |
|
| 79 | - // 'service_manager' => array(), |
|
| 77 | + // Initial configuration with which to seed the ServiceManager. |
|
| 78 | + // Should be compatible with Laminas\ServiceManager\Config. |
|
| 79 | + // 'service_manager' => array(), |
|
| 80 | 80 | ); |
| 81 | 81 | \ No newline at end of file |
@@ -25,10 +25,10 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | class AssertionManager extends AbstractPluginManager |
| 27 | 27 | { |
| 28 | - /** |
|
| 29 | - * @var ContainerInterface |
|
| 30 | - */ |
|
| 31 | - protected $container; |
|
| 28 | + /** |
|
| 29 | + * @var ContainerInterface |
|
| 30 | + */ |
|
| 31 | + protected $container; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Creates an instance. |
@@ -58,20 +58,20 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function injectEventManager($assertion, $serviceLocator) |
| 60 | 60 | { |
| 61 | - //@TODO: [ZF3] check if ACL working properly |
|
| 61 | + //@TODO: [ZF3] check if ACL working properly |
|
| 62 | 62 | /* @var $serviceLocator AssertionManager */ |
| 63 | 63 | |
| 64 | 64 | if (!$assertion instanceof EventManagerAwareInterface) { |
| 65 | 65 | return; |
| 66 | 66 | } |
| 67 | 67 | /* @var EventManager $events */ |
| 68 | - $container = $this->container; |
|
| 68 | + $container = $this->container; |
|
| 69 | 69 | $events = $assertion->getEventManager(); |
| 70 | 70 | if (!$events instanceof EventManagerInterface) { |
| 71 | 71 | $events = $container->get('EventManager'); /* @var $events \Laminas\EventManager\EventManagerInterface */ |
| 72 | 72 | $assertion->setEventManager($events); |
| 73 | 73 | } else { |
| 74 | - //@TODO: [ZF3] setSharedManager method now is removed |
|
| 74 | + //@TODO: [ZF3] setSharedManager method now is removed |
|
| 75 | 75 | //$sharedEvents = $container->get('SharedEventManager'); /* @var $sharedEvents \Laminas\EventManager\SharedEventManagerInterface */ |
| 76 | 76 | //$events->setSharedManager($sharedEvents); |
| 77 | 77 | } |
@@ -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') |