@@ -78,61 +78,61 @@ |
||
78 | 78 | ] |
79 | 79 | ], |
80 | 80 | [ |
81 | - 'type' => 'Core/Datepicker', |
|
82 | - 'name' => 'endDate', |
|
83 | - 'options' => [ |
|
84 | - 'label' => 'End date' |
|
85 | - ], |
|
81 | + 'type' => 'Core/Datepicker', |
|
82 | + 'name' => 'endDate', |
|
83 | + 'options' => [ |
|
84 | + 'label' => 'End date' |
|
85 | + ], |
|
86 | 86 | ], |
87 | - [ |
|
88 | - 'type' => 'checkbox', |
|
89 | - 'name' => 'currentIndicator', |
|
90 | - 'options' => [ |
|
91 | - 'label' => 'ongoing' |
|
92 | - ] |
|
93 | - ], |
|
94 | - [ |
|
95 | - 'name' => 'competencyName', |
|
96 | - 'options' => [ |
|
97 | - 'label' => 'Degree'], |
|
98 | - 'attributes' => [ |
|
99 | - 'title' => 'please enter the name of your qualification' |
|
100 | - ], |
|
101 | - ], |
|
102 | - [ |
|
103 | - 'name' => 'organizationName', |
|
104 | - 'options' => [ |
|
105 | - 'label' => 'Organization Name'], |
|
106 | - 'attributes' => [ |
|
107 | - 'title' => 'please enter the name of the university or school' |
|
108 | - ], |
|
109 | - ], |
|
87 | + [ |
|
88 | + 'type' => 'checkbox', |
|
89 | + 'name' => 'currentIndicator', |
|
90 | + 'options' => [ |
|
91 | + 'label' => 'ongoing' |
|
92 | + ] |
|
93 | + ], |
|
94 | + [ |
|
95 | + 'name' => 'competencyName', |
|
96 | + 'options' => [ |
|
97 | + 'label' => 'Degree'], |
|
98 | + 'attributes' => [ |
|
99 | + 'title' => 'please enter the name of your qualification' |
|
100 | + ], |
|
101 | + ], |
|
102 | + [ |
|
103 | + 'name' => 'organizationName', |
|
104 | + 'options' => [ |
|
105 | + 'label' => 'Organization Name'], |
|
106 | + 'attributes' => [ |
|
107 | + 'title' => 'please enter the name of the university or school' |
|
108 | + ], |
|
109 | + ], |
|
110 | 110 | [ |
111 | - 'name' => 'country', |
|
112 | - 'options' => [ |
|
113 | - 'label' => 'Country'], |
|
114 | - 'attributes' => [ |
|
115 | - 'title' => /*@translate */ 'please select the country' |
|
116 | - ], |
|
117 | - ], |
|
118 | - [ |
|
119 | - 'name' => 'city', |
|
120 | - 'options' => [ |
|
121 | - 'label' => 'City'], |
|
122 | - 'attributes' => [ |
|
123 | - 'title' => 'please enter the name of the city' |
|
124 | - ], |
|
125 | - ], |
|
126 | - [ |
|
127 | - 'name' => 'description', |
|
128 | - 'type' => 'Zend\Form\Element\Textarea', |
|
129 | - 'options' => [ |
|
130 | - 'label' => 'Description', |
|
131 | - ], |
|
132 | - 'attributes' => [ |
|
133 | - 'title' => 'please enter a description', |
|
134 | - ], |
|
135 | - ], |
|
111 | + 'name' => 'country', |
|
112 | + 'options' => [ |
|
113 | + 'label' => 'Country'], |
|
114 | + 'attributes' => [ |
|
115 | + 'title' => /*@translate */ 'please select the country' |
|
116 | + ], |
|
117 | + ], |
|
118 | + [ |
|
119 | + 'name' => 'city', |
|
120 | + 'options' => [ |
|
121 | + 'label' => 'City'], |
|
122 | + 'attributes' => [ |
|
123 | + 'title' => 'please enter the name of the city' |
|
124 | + ], |
|
125 | + ], |
|
126 | + [ |
|
127 | + 'name' => 'description', |
|
128 | + 'type' => 'Zend\Form\Element\Textarea', |
|
129 | + 'options' => [ |
|
130 | + 'label' => 'Description', |
|
131 | + ], |
|
132 | + 'attributes' => [ |
|
133 | + 'title' => 'please enter a description', |
|
134 | + ], |
|
135 | + ], |
|
136 | 136 | ]; |
137 | 137 | |
138 | 138 | $addArgValidator = function ($arg) use ($add) { |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | public function testInit() |
35 | 35 | { |
36 | 36 | $target = $this->getMockBuilder('\Install\Form\Installation') |
37 | - ->setMethods(array('add', 'setName', 'setAttributes')) |
|
38 | - ->disableOriginalConstructor() |
|
39 | - ->getMock(); |
|
37 | + ->setMethods(array('add', 'setName', 'setAttributes')) |
|
38 | + ->disableOriginalConstructor() |
|
39 | + ->getMock(); |
|
40 | 40 | |
41 | 41 | $add1 = array( |
42 | 42 | 'type' => 'Text', |
@@ -74,19 +74,19 @@ discard block |
||
74 | 74 | ); |
75 | 75 | |
76 | 76 | $target->expects($this->exactly(4)) |
77 | - ->method('add') |
|
78 | - ->withConsecutive( |
|
79 | - array($add1), |
|
80 | - array($add2), |
|
81 | - array($add3), |
|
82 | - array($add4) |
|
83 | - )->will($this->returnSelf()); |
|
77 | + ->method('add') |
|
78 | + ->withConsecutive( |
|
79 | + array($add1), |
|
80 | + array($add2), |
|
81 | + array($add3), |
|
82 | + array($add4) |
|
83 | + )->will($this->returnSelf()); |
|
84 | 84 | |
85 | 85 | $target->expects($this->once())->method('setName')->with('installation'); |
86 | 86 | $target->expects($this->once())->method('setAttributes')->with( |
87 | 87 | array( |
88 | - 'method' => 'post', |
|
89 | - ) |
|
88 | + 'method' => 'post', |
|
89 | + ) |
|
90 | 90 | ); |
91 | 91 | /* @var $target \PHPUnit_Framework_MockObject_MockObject|\Install\Form\Installation */ |
92 | 92 | $target->init(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | ), |
104 | 104 | 'validators' => array( |
105 | 105 | array('name' => MongoDbConnectionString::class, |
106 | - 'break_chain_on_failure' => true), |
|
106 | + 'break_chain_on_failure' => true), |
|
107 | 107 | array('name' => MongoDbConnection::class), |
108 | 108 | ), |
109 | 109 | ), |
@@ -74,8 +74,8 @@ |
||
74 | 74 | $this->target->setPluginManager($plugins); |
75 | 75 | |
76 | 76 | $params = $this->getMockBuilder('\Zend\Mvc\Controller\Plugin\Params') |
77 | - ->disableOriginalConstructor() |
|
78 | - ->getMock() |
|
77 | + ->disableOriginalConstructor() |
|
78 | + ->getMock() |
|
79 | 79 | ; |
80 | 80 | $params |
81 | 81 | ->expects($this->any()) |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $target = new InvitationHandlerFactory(); |
47 | 47 | |
48 | 48 | $tokenGenerator = $this->getMockBuilder('\Auth\Service\UserUniqueTokenGenerator') |
49 | - ->disableOriginalConstructor()->getMock(); |
|
49 | + ->disableOriginalConstructor()->getMock(); |
|
50 | 50 | |
51 | 51 | $userRepository = $this->getMockBuilder('\Auth\Repository\User')->disableOriginalConstructor()->getMock(); |
52 | 52 | |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | $translator = new \Zend\I18n\Translator\Translator(); |
57 | 57 | |
58 | 58 | $mailer = $this->getMockBuilder('\Core\Controller\Plugin\Mailer') |
59 | - ->disableOriginalConstructor() |
|
60 | - ->getMock() |
|
59 | + ->disableOriginalConstructor() |
|
60 | + ->getMock() |
|
61 | 61 | ; |
62 | 62 | |
63 | 63 | $pluginManager = $this->getMockBuilder(PluginManager::class) |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | |
79 | 79 | $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock(); |
80 | 80 | $services->expects($this->exactly(5)) |
81 | - ->method('get') |
|
82 | - ->will($this->returnValueMap(array( |
|
83 | - array('ValidatorManager', $validators), // get ha signature ($name, $usePeeringManagers = true) |
|
84 | - array('translator', $translator), |
|
85 | - array('repositories', $repositories), |
|
86 | - array('Auth/UserTokenGenerator', $tokenGenerator), |
|
87 | - array('ControllerPluginManager',$pluginManager), |
|
88 | - ))); |
|
81 | + ->method('get') |
|
82 | + ->will($this->returnValueMap(array( |
|
83 | + array('ValidatorManager', $validators), // get ha signature ($name, $usePeeringManagers = true) |
|
84 | + array('translator', $translator), |
|
85 | + array('repositories', $repositories), |
|
86 | + array('Auth/UserTokenGenerator', $tokenGenerator), |
|
87 | + array('ControllerPluginManager',$pluginManager), |
|
88 | + ))); |
|
89 | 89 | |
90 | 90 | /* |
91 | 91 | * test start here |
@@ -55,17 +55,17 @@ |
||
55 | 55 | $auth = $this->getMockBuilder('\Auth\AuthenticationService')->disableOriginalConstructor()->getMock(); |
56 | 56 | |
57 | 57 | $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager') |
58 | - ->disableOriginalConstructor() |
|
59 | - ->getMock() |
|
58 | + ->disableOriginalConstructor() |
|
59 | + ->getMock() |
|
60 | 60 | ; |
61 | 61 | $services->expects($this->exactly(2)) |
62 | - ->method('get') |
|
63 | - ->will($this->returnValueMap( |
|
64 | - array( |
|
62 | + ->method('get') |
|
63 | + ->will($this->returnValueMap( |
|
64 | + array( |
|
65 | 65 | array('repositories',$repositories), |
66 | 66 | array('AuthenticationService', $auth) |
67 | 67 | ) |
68 | - )) |
|
68 | + )) |
|
69 | 69 | ; |
70 | 70 | |
71 | 71 | $target = new AcceptInvitationHandlerFactory(); |
@@ -49,11 +49,11 @@ |
||
49 | 49 | |
50 | 50 | $repos = $this->getMockBuilder('\Core\Repository\RepositoryService')->disableOriginalConstructor()->getMock(); |
51 | 51 | $repos->expects($this->once()) |
52 | - ->method('get')->with('Auth/User')->willReturn($users); |
|
52 | + ->method('get')->with('Auth/User')->willReturn($users); |
|
53 | 53 | |
54 | 54 | $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock(); |
55 | 55 | $services->expects($this->once()) |
56 | - ->method('get')->with('repositories')->willReturn($repos); |
|
56 | + ->method('get')->with('repositories')->willReturn($repos); |
|
57 | 57 | |
58 | 58 | $fieldset = $target->__invoke($services, 'irrelevant'); |
59 | 59 |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | |
118 | 118 | $orgRep = $this->getMockBuilder('\Organizations\Repository\Organization')->disableOriginalConstructor()->getMock(); |
119 | 119 | $orgRep->expects($this->exactly(2)) |
120 | - ->method('findByUser') |
|
121 | - ->withConsecutive(array('testOwner'), array('testUser')) |
|
122 | - ->will($this->onConsecutiveCalls($ownerOrg, $userOrg)); |
|
120 | + ->method('findByUser') |
|
121 | + ->withConsecutive(array('testOwner'), array('testUser')) |
|
122 | + ->will($this->onConsecutiveCalls($ownerOrg, $userOrg)); |
|
123 | 123 | |
124 | 124 | |
125 | 125 | $ownerOrgRef = new OrganizationReference('testOwner', $orgRep); |
@@ -136,25 +136,25 @@ discard block |
||
136 | 136 | |
137 | 137 | $router = $this->getMockForAbstractClass(RouteStackInterface::class); |
138 | 138 | $router->expects($this->once()) |
139 | - ->method('assemble') |
|
140 | - ->with( |
|
141 | - array('action' => 'accept'), |
|
142 | - array('name' => 'lang/organizations/invite', |
|
139 | + ->method('assemble') |
|
140 | + ->with( |
|
141 | + array('action' => 'accept'), |
|
142 | + array('name' => 'lang/organizations/invite', |
|
143 | 143 | 'query' => array('token' => $options['token'], 'organization' => $ownerOrg->getId())) |
144 | - ) |
|
145 | - ->willReturn('testUrl'); |
|
144 | + ) |
|
145 | + ->willReturn('testUrl'); |
|
146 | 146 | |
147 | 147 | $mailService = $this->getMockBuilder('\Core\Mail\MailService')->disableOriginalConstructor()->getMock(); |
148 | 148 | |
149 | 149 | $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock(); |
150 | 150 | |
151 | 151 | $services->expects($this->exactly(3)) |
152 | - ->method('get') |
|
153 | - ->withConsecutive( |
|
154 | - array('AuthenticationService'), |
|
155 | - array('Router'), |
|
156 | - ['Core/MailService'] |
|
157 | - )->will($this->onConsecutiveCalls($authService, $router, $mailService)); |
|
152 | + ->method('get') |
|
153 | + ->withConsecutive( |
|
154 | + array('AuthenticationService'), |
|
155 | + array('Router'), |
|
156 | + ['Core/MailService'] |
|
157 | + )->will($this->onConsecutiveCalls($authService, $router, $mailService)); |
|
158 | 158 | |
159 | 159 | $mailMock = new HTMLTemplateMessage(new \Zend\ServiceManager\ServiceManager()); |
160 | 160 | $translator = $this->getMockBuilder('\Zend\I18n\Translator\Translator')->disableOriginalConstructor()->getMock(); |
@@ -104,15 +104,15 @@ |
||
104 | 104 | ->getMock(); |
105 | 105 | |
106 | 106 | $target->expects($this->exactly(4)) |
107 | - ->method('add') |
|
108 | - ->withConsecutive( |
|
109 | - array($expectAdd1), |
|
110 | - array($expectAdd2), |
|
111 | - array($expectAdd3), |
|
112 | - array($expectAdd4) |
|
107 | + ->method('add') |
|
108 | + ->withConsecutive( |
|
109 | + array($expectAdd1), |
|
110 | + array($expectAdd2), |
|
111 | + array($expectAdd3), |
|
112 | + array($expectAdd4) |
|
113 | 113 | |
114 | 114 | |
115 | - ); |
|
115 | + ); |
|
116 | 116 | |
117 | 117 | $target->init(); |
118 | 118 | } |
@@ -88,11 +88,11 @@ |
||
88 | 88 | ->getMock(); |
89 | 89 | |
90 | 90 | $target->expects($this->exactly(2)) |
91 | - ->method('add') |
|
92 | - ->withConsecutive( |
|
93 | - array($expectAdd1), |
|
94 | - array($expectAdd2) |
|
95 | - ); |
|
91 | + ->method('add') |
|
92 | + ->withConsecutive( |
|
93 | + array($expectAdd1), |
|
94 | + array($expectAdd2) |
|
95 | + ); |
|
96 | 96 | |
97 | 97 | $target->init(); |
98 | 98 | $this->assertEquals('employees', $target->getName()); |