@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | try { |
97 | 97 | $this->expectationManager->get($test->getExpectation()); |
98 | 98 | } catch (ExpectationNotFoundException $ex) { |
99 | - return new JsonResponse("Expectation '" . $test->getExpectation() . "' could not be found", JsonResponse::HTTP_UNPROCESSABLE_ENTITY); |
|
99 | + return new JsonResponse("Expectation '".$test->getExpectation()."' could not be found", JsonResponse::HTTP_UNPROCESSABLE_ENTITY); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | if ($test->getActual() === null) { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | foreach (['name', 'actual', 'expectation', 'expected'] as $field) { |
162 | 162 | if ($request->request->has($field)) { |
163 | - $test->{'set' . ucfirst($field)}($request->request->get($field)); |
|
163 | + $test->{'set'.ucfirst($field)}($request->request->get($field)); |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | public function testGetGroup() |
113 | 113 | { |
114 | 114 | $this->logIn('ROLE_SUPER_ADMIN'); |
115 | - $this->client->request('GET', '/api/groups/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
115 | + $this->client->request('GET', '/api/groups/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
116 | 116 | |
117 | 117 | $this->assertJsonResponse($this->client->getResponse()); |
118 | 118 | $this->assertJsonStringEqualsJsonString( |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | public function testGetGroupInsufficentPerms() |
127 | 127 | { |
128 | 128 | $this->logIn('ROLE_ADMIN'); |
129 | - $this->client->request('GET', '/api/groups/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
129 | + $this->client->request('GET', '/api/groups/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
130 | 130 | |
131 | 131 | $this->assertForbidden($this->client->getResponse()); |
132 | 132 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $this->logIn('ROLE_SUPER_ADMIN'); |
147 | 147 | $this->makeJsonRequest( |
148 | 148 | 'PUT', |
149 | - '/api/groups/' . TestGroupFixtures::$groups['group-2']->getId(), |
|
149 | + '/api/groups/'.TestGroupFixtures::$groups['group-2']->getId(), |
|
150 | 150 | [ |
151 | 151 | 'name' => $newName |
152 | 152 | ] |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function testUpdateGroupInsufficentPerms() |
167 | 167 | { |
168 | 168 | $this->logIn('ROLE_USER'); |
169 | - $this->client->request('PUT', '/api/groups/' . TestGroupFixtures::$groups['group-2']->getId()); |
|
169 | + $this->client->request('PUT', '/api/groups/'.TestGroupFixtures::$groups['group-2']->getId()); |
|
170 | 170 | |
171 | 171 | $this->assertForbidden($this->client->getResponse()); |
172 | 172 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function testDeleteGroup() |
183 | 183 | { |
184 | 184 | $this->logIn('ROLE_SUPER_ADMIN'); |
185 | - $this->client->request('DELETE', '/api/groups/' . TestGroupFixtures::$groups['group-3']->getId()); |
|
185 | + $this->client->request('DELETE', '/api/groups/'.TestGroupFixtures::$groups['group-3']->getId()); |
|
186 | 186 | |
187 | 187 | $this->assertEquals(Response::HTTP_NO_CONTENT, $this->client->getResponse()->getStatusCode()); |
188 | 188 | $this->assertNull($this->em->find("Overwatch\TestBundle\Entity\TestGroup", TestGroupFixtures::$groups['group-3']->getId())); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | public function testDeleteGroupPopulatedGroup() |
192 | 192 | { |
193 | 193 | $this->logIn('ROLE_SUPER_ADMIN'); |
194 | - $this->client->request('DELETE', '/api/groups/' . TestGroupFixtures::$groups['group-2']->getId()); |
|
194 | + $this->client->request('DELETE', '/api/groups/'.TestGroupFixtures::$groups['group-2']->getId()); |
|
195 | 195 | |
196 | 196 | $this->assertEquals(Response::HTTP_UNPROCESSABLE_ENTITY, $this->client->getResponse()->getStatusCode()); |
197 | 197 | $this->assertNotNull($this->em->find("Overwatch\TestBundle\Entity\TestGroup", TestGroupFixtures::$groups['group-2']->getId())); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | public function testDeleteGroupInsufficentPerms() |
201 | 201 | { |
202 | 202 | $this->logIn('ROLE_ADMIN'); |
203 | - $this->client->request('DELETE', '/api/groups/' . TestGroupFixtures::$groups['group-3']->getId()); |
|
203 | + $this->client->request('DELETE', '/api/groups/'.TestGroupFixtures::$groups['group-3']->getId()); |
|
204 | 204 | |
205 | 205 | $this->assertForbidden($this->client->getResponse()); |
206 | 206 | $this->assertNotNull($this->em->find("Overwatch\TestBundle\Entity\TestGroup", TestGroupFixtures::$groups['group-2']->getId())); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $group = TestGroupFixtures::$groups['group-3']; |
221 | 221 | |
222 | 222 | $this->logIn('ROLE_SUPER_ADMIN'); |
223 | - $this->client->request('POST', '/api/groups/' . $group->getId() . '/user/' . $user->getId()); |
|
223 | + $this->client->request('POST', '/api/groups/'.$group->getId().'/user/'.$user->getId()); |
|
224 | 224 | |
225 | 225 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
226 | 226 | |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $group = TestGroupFixtures::$groups['group-3']; |
236 | 236 | |
237 | 237 | $this->logIn('ROLE_ADMIN'); |
238 | - $this->client->request('POST', '/api/groups/' . $group->getId() . '/user/' . $user->getId()); |
|
238 | + $this->client->request('POST', '/api/groups/'.$group->getId().'/user/'.$user->getId()); |
|
239 | 239 | |
240 | 240 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
241 | 241 | |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $user = UserFixtures::$users['user-2']; |
249 | 249 | |
250 | 250 | $this->logIn('ROLE_SUPER_ADMIN'); |
251 | - $this->client->request('POST', '/api/groups/1000/user/' . $user->getId()); |
|
251 | + $this->client->request('POST', '/api/groups/1000/user/'.$user->getId()); |
|
252 | 252 | |
253 | 253 | $this->assertEquals(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode()); |
254 | 254 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $group = TestGroupFixtures::$groups['group-3']; |
259 | 259 | |
260 | 260 | $this->logIn('ROLE_SUPER_ADMIN'); |
261 | - $this->client->request('POST', '/api/groups/' . $group->getId() . '/user/1000'); |
|
261 | + $this->client->request('POST', '/api/groups/'.$group->getId().'/user/1000'); |
|
262 | 262 | |
263 | 263 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
264 | 264 | |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $group = TestGroupFixtures::$groups['group-1']; |
273 | 273 | |
274 | 274 | $this->logIn('ROLE_SUPER_ADMIN'); |
275 | - $this->client->request('DELETE', '/api/groups/' . $group->getId() . '/user/' . $user->getId()); |
|
275 | + $this->client->request('DELETE', '/api/groups/'.$group->getId().'/user/'.$user->getId()); |
|
276 | 276 | |
277 | 277 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
278 | 278 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $group = TestGroupFixtures::$groups['group-1']; |
288 | 288 | |
289 | 289 | $this->logIn('ROLE_ADMIN'); |
290 | - $this->client->request('DELETE', '/api/groups/' . $group->getId() . '/user/' . $user->getId()); |
|
290 | + $this->client->request('DELETE', '/api/groups/'.$group->getId().'/user/'.$user->getId()); |
|
291 | 291 | |
292 | 292 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
293 | 293 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $group = TestGroupFixtures::$groups['group-1']; |
302 | 302 | |
303 | 303 | $this->logIn('ROLE_SUPER_ADMIN'); |
304 | - $this->client->request('DELETE', '/api/groups/1000/user/' . $user->getId()); |
|
304 | + $this->client->request('DELETE', '/api/groups/1000/user/'.$user->getId()); |
|
305 | 305 | |
306 | 306 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
307 | 307 | |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | $group = TestGroupFixtures::$groups['group-1']; |
315 | 315 | |
316 | 316 | $this->logIn('ROLE_SUPER_ADMIN'); |
317 | - $this->client->request('DELETE', '/api/groups/' . $group->getId() . '/user/1000'); |
|
317 | + $this->client->request('DELETE', '/api/groups/'.$group->getId().'/user/1000'); |
|
318 | 318 | |
319 | 319 | $group = $this->em->find("Overwatch\TestBundle\Entity\TestGroup", $group->getId()); |
320 | 320 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->logIn('ROLE_SUPER_ADMIN'); |
27 | 27 | $this->makeJsonRequest( |
28 | 28 | 'POST', |
29 | - '/api/tests/group/' . TestGroupFixtures::$groups['group-2']->getId(), |
|
29 | + '/api/tests/group/'.TestGroupFixtures::$groups['group-2']->getId(), |
|
30 | 30 | [ |
31 | 31 | 'name' => $newTest->getName(), |
32 | 32 | 'actual' => $newTest->getActual(), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function testCreateTestInsufficentPerms() |
53 | 53 | { |
54 | 54 | $this->logIn('ROLE_USER'); |
55 | - $this->client->request('POST', '/api/tests/group/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
55 | + $this->client->request('POST', '/api/tests/group/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
56 | 56 | |
57 | 57 | $this->assertForbidden($this->client->getResponse()); |
58 | 58 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $this->logIn('ROLE_SUPER_ADMIN'); |
70 | 70 | $this->makeJsonRequest( |
71 | 71 | 'POST', |
72 | - '/api/tests/group/' . TestGroupFixtures::$groups['group-2']->getId(), |
|
72 | + '/api/tests/group/'.TestGroupFixtures::$groups['group-2']->getId(), |
|
73 | 73 | [ |
74 | 74 | 'name' => $newTest->getName(), |
75 | 75 | 'actual' => $newTest->getActual(), |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->logIn('ROLE_SUPER_ADMIN'); |
98 | 98 | $this->makeJsonRequest( |
99 | 99 | 'POST', |
100 | - '/api/tests/group/' . TestGroupFixtures::$groups['group-2']->getId(), |
|
100 | + '/api/tests/group/'.TestGroupFixtures::$groups['group-2']->getId(), |
|
101 | 101 | [ |
102 | 102 | 'name' => $newTest->getName(), |
103 | 103 | 'expectation' => $newTest->getExpectation() |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | public function testGetTestsInGroup() |
116 | 116 | { |
117 | 117 | $this->logIn('ROLE_SUPER_ADMIN'); |
118 | - $this->client->request('GET', '/api/tests/group/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
118 | + $this->client->request('GET', '/api/tests/group/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
119 | 119 | |
120 | 120 | $this->assertJsonResponse($this->client->getResponse()); |
121 | 121 | $this->assertCount(2, $this->getResponseContent()); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | public function testGetTestsInGroupInsufficentPerms() |
133 | 133 | { |
134 | 134 | $this->logIn('ROLE_ADMIN'); |
135 | - $this->client->request('GET', '/api/tests/group/' . TestGroupFixtures::$groups['group-1']->getId()); |
|
135 | + $this->client->request('GET', '/api/tests/group/'.TestGroupFixtures::$groups['group-1']->getId()); |
|
136 | 136 | |
137 | 137 | $this->assertForbidden($this->client->getResponse()); |
138 | 138 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | public function testGetTest() |
149 | 149 | { |
150 | 150 | $this->logIn('ROLE_SUPER_ADMIN'); |
151 | - $this->client->request('GET', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
151 | + $this->client->request('GET', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
152 | 152 | |
153 | 153 | $this->assertJsonResponse($this->client->getResponse()); |
154 | 154 | $this->assertJsonStringEqualsJsonString( |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function testGetTestInsufficentPerms() |
163 | 163 | { |
164 | 164 | $this->logIn('ROLE_ADMIN'); |
165 | - $this->client->request('GET', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
165 | + $this->client->request('GET', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
166 | 166 | |
167 | 167 | $this->assertForbidden($this->client->getResponse()); |
168 | 168 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $this->logIn('ROLE_SUPER_ADMIN'); |
183 | 183 | $this->makeJsonRequest( |
184 | 184 | 'PUT', |
185 | - '/api/tests/' . TestFixtures::$tests['test-1']->getId(), |
|
185 | + '/api/tests/'.TestFixtures::$tests['test-1']->getId(), |
|
186 | 186 | [ |
187 | 187 | 'name' => $newName |
188 | 188 | ] |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | public function testUpdateTestInsufficentPerms() |
203 | 203 | { |
204 | 204 | $this->logIn('ROLE_USER'); |
205 | - $this->client->request('PUT', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
205 | + $this->client->request('PUT', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
206 | 206 | |
207 | 207 | $this->assertForbidden($this->client->getResponse()); |
208 | 208 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | public function testDeleteTest() |
219 | 219 | { |
220 | 220 | $this->logIn('ROLE_SUPER_ADMIN'); |
221 | - $this->client->request('DELETE', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
221 | + $this->client->request('DELETE', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
222 | 222 | |
223 | 223 | $this->assertTrue($this->client->getResponse()->isSuccessful()); |
224 | 224 | $this->assertEquals(Response::HTTP_NO_CONTENT, $this->client->getResponse()->getStatusCode()); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | public function testDeleteTestInsufficentPerms() |
229 | 229 | { |
230 | 230 | $this->logIn('ROLE_USER'); |
231 | - $this->client->request('DELETE', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
231 | + $this->client->request('DELETE', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
232 | 232 | |
233 | 233 | $this->assertForbidden($this->client->getResponse()); |
234 | 234 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | public function testRunTest() |
245 | 245 | { |
246 | 246 | $this->logIn('ROLE_SUPER_ADMIN'); |
247 | - $this->client->request('POST', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
247 | + $this->client->request('POST', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
248 | 248 | |
249 | 249 | $test = $this->em->find("Overwatch\TestBundle\Entity\Test", TestFixtures::$tests['test-1']->getId()); |
250 | 250 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | public function testRunTestInsufficentPerms() |
259 | 259 | { |
260 | 260 | $this->logIn('ROLE_USER'); |
261 | - $this->client->request('POST', '/api/tests/' . TestFixtures::$tests['test-1']->getId()); |
|
261 | + $this->client->request('POST', '/api/tests/'.TestFixtures::$tests['test-1']->getId()); |
|
262 | 262 | |
263 | 263 | $this->assertForbidden($this->client->getResponse()); |
264 | 264 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $field = strtolower($field); |
74 | 74 | |
75 | 75 | if ($value === null) { |
76 | - $value = TestFixtures::$tests['test-1']->{'get' . ucfirst($field)}(); |
|
76 | + $value = TestFixtures::$tests['test-1']->{'get'.ucfirst($field)}(); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($field === 'expectation') { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $command = new TestsRunCommand(); |
34 | 34 | $command->setContainer($this->getContainer()); |
35 | 35 | |
36 | - $this->application = new Application('Overwatch', '0.0.1-test.' . time()); |
|
36 | + $this->application = new Application('Overwatch', '0.0.1-test.'.time()); |
|
37 | 37 | $this->application->add($command); |
38 | 38 | |
39 | 39 | $this->command = new CommandTester($command); |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | $this->assertCountLinesOfOutput(5); |
70 | 70 | |
71 | 71 | $this->assertHasStandardOutput(); |
72 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-1'] . ' : PASSED - Pinged in ', $this->output[1]); |
|
72 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-1'].' : PASSED - Pinged in ', $this->output[1]); |
|
73 | 73 | $this->assertRegExp('/0\.[0-9]+s$/', $this->output[1]); |
74 | 74 | |
75 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-2'] . ' : PASSED - Pinged in ', $this->output[2]); |
|
75 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-2'].' : PASSED - Pinged in ', $this->output[2]); |
|
76 | 76 | $this->assertRegExp('/0\.[0-9]+s$/', $this->output[2]); |
77 | 77 | |
78 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-3'] . ' : PASSED - Pinged in ', $this->output[3]); |
|
78 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-3'].' : PASSED - Pinged in ', $this->output[3]); |
|
79 | 79 | $this->assertRegExp('/0\.[0-9]+s$/', $this->output[3]); |
80 | 80 | |
81 | 81 | $this->assertCountRunTests(); |
@@ -149,10 +149,10 @@ discard block |
||
149 | 149 | |
150 | 150 | $this->assertHasStandardOutput(); |
151 | 151 | |
152 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-2'] . ' : UNSATISFACTORY - ', $this->output[1]); |
|
152 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-2'].' : UNSATISFACTORY - ', $this->output[1]); |
|
153 | 153 | $this->assertRegExp('/responded in 1\.[0-9]+ s, above the unsatisfactory threshold \(1 s\)$/', $this->output[1]); |
154 | 154 | |
155 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-3'] . ' : FAILED - ', $this->output[2]); |
|
155 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-3'].' : FAILED - ', $this->output[2]); |
|
156 | 156 | $this->assertStringEndsWith('failed to respond in the timeout threshold (2 s)', $this->output[2]); |
157 | 157 | |
158 | 158 | |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | |
176 | 176 | $this->assertHasStandardOutput(); |
177 | 177 | |
178 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-1'] . ' : PASSED - Pinged in ', $this->output[1]); |
|
178 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-1'].' : PASSED - Pinged in ', $this->output[1]); |
|
179 | 179 | $this->assertRegExp('/0\.[0-9]+s$/', $this->output[1]); |
180 | 180 | |
181 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-2'] . ' : UNSATISFACTORY - ', $this->output[2]); |
|
181 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-2'].' : UNSATISFACTORY - ', $this->output[2]); |
|
182 | 182 | $this->assertRegExp('/responded in 1\.[0-9]+ s, above the unsatisfactory threshold \(1 s\)$/', $this->output[2]); |
183 | 183 | |
184 | - $this->assertStringStartsWith(' > ' . TestFixtures::$tests['test-3'] . ' : FAILED - ', $this->output[3]); |
|
184 | + $this->assertStringStartsWith(' > '.TestFixtures::$tests['test-3'].' : FAILED - ', $this->output[3]); |
|
185 | 185 | $this->assertStringEndsWith('failed to respond in the timeout threshold (2 s)', $this->output[3]); |
186 | 186 | |
187 | 187 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | throw new \InvalidArgumentException('Could not find any tests to run.'); |
71 | 71 | } |
72 | 72 | |
73 | - $output->writeln($this->getApplication()->getLongVersion() . ', running <info>' . count($tests) . '</info> tests'); |
|
73 | + $output->writeln($this->getApplication()->getLongVersion().', running <info>'.count($tests).'</info> tests'); |
|
74 | 74 | |
75 | 75 | foreach ($tests as $test) { |
76 | 76 | $result = $this->expectations->run($test); |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | //Don't output if we're not running verbosely and the test passes. |
80 | 80 | if ($result->getStatus() !== ResultStatus::PASSED || $output->isVerbose()) { |
81 | 81 | $output->writeln( |
82 | - ' > ' . $test->getName() . ' : ' . |
|
83 | - $this->getColouredStatus($result->getStatus()) . |
|
84 | - ' - ' . $result->getInfo() |
|
82 | + ' > '.$test->getName().' : '. |
|
83 | + $this->getColouredStatus($result->getStatus()). |
|
84 | + ' - '.$result->getInfo() |
|
85 | 85 | ); |
86 | 86 | } |
87 | 87 | $this->_em->persist($result); |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | if ($value === null) { |
105 | 105 | $value = $status; |
106 | 106 | } else { |
107 | - $value .= ' ' . $status; |
|
107 | + $value .= ' '.$status; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | ResultStatus::isValid($status); |
111 | - return '<' . $this->colours[$status] . '>' . $value . '</' . $this->colours[$status] . '>'; |
|
111 | + return '<'.$this->colours[$status].'>'.$value.'</'.$this->colours[$status].'>'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | $summary = ''; |
122 | 122 | |
123 | 123 | foreach (ResultStatus::getAll() as $status) { |
124 | - $summary .= $this->getColouredStatus($status, $this->results[$status]) . ', '; |
|
124 | + $summary .= $this->getColouredStatus($status, $this->results[$status]).', '; |
|
125 | 125 | } |
126 | 126 | |
127 | - $summary .= 'in ' . $runTime->i . ' minutes and ' . $runTime->s . ' seconds'; |
|
127 | + $summary .= 'in '.$runTime->i.' minutes and '.$runTime->s.' seconds'; |
|
128 | 128 | return $summary; |
129 | 129 | } |
130 | 130 | } |
@@ -38,6 +38,6 @@ |
||
38 | 38 | $this->getUser()->resetApiKey(); |
39 | 39 | $this->_em->flush(); |
40 | 40 | |
41 | - return $this->redirect($this->generateUrl('overwatch_user_app_index') . '#/my-account'); |
|
41 | + return $this->redirect($this->generateUrl('overwatch_user_app_index').'#/my-account'); |
|
42 | 42 | } |
43 | 43 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | $apiToken = hash_hmac( |
84 | 84 | 'sha256', |
85 | - 'timestamp=' . $credentials[self::TIMESTAMP], |
|
85 | + 'timestamp='.$credentials[self::TIMESTAMP], |
|
86 | 86 | $user->getApiKey() |
87 | 87 | ); |
88 | 88 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
21 | 21 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
22 | 22 | $this->client->enableProfiler(); |
23 | - $this->client->request('POST', '/api/users/' . $email); |
|
23 | + $this->client->request('POST', '/api/users/'.$email); |
|
24 | 24 | |
25 | 25 | $this->assertJsonResponse($this->client->getResponse()); |
26 | 26 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function testFindUser() |
66 | 66 | { |
67 | 67 | $this->logIn('ROLE_SUPER_ADMIN'); |
68 | - $this->client->request('GET', '/api/users/' . UserFixtures::$users['user-1']); |
|
68 | + $this->client->request('GET', '/api/users/'.UserFixtures::$users['user-1']); |
|
69 | 69 | |
70 | 70 | $this->assertJsonResponse($this->client->getResponse()); |
71 | 71 | $this->assertJsonStringEqualsJsonString( |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | public function testFindUserInsufficentPerms() |
81 | 81 | { |
82 | 82 | $this->logIn('ROLE_ADMIN'); |
83 | - $this->client->request('GET', '/api/users/' . UserFixtures::$users['user-1']); |
|
83 | + $this->client->request('GET', '/api/users/'.UserFixtures::$users['user-1']); |
|
84 | 84 | |
85 | 85 | $this->assertForbidden($this->client->getResponse()); |
86 | 86 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | { |
152 | 152 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
153 | 153 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
154 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-2']->getId() . '/lock'); |
|
154 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-2']->getId().'/lock'); |
|
155 | 155 | |
156 | 156 | $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId()); |
157 | 157 | $this->assertTrue($user->isLocked()); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function testToggleLockUserInsufficentPerms() |
167 | 167 | { |
168 | 168 | $this->logIn('ROLE_ADMIN'); |
169 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/lock'); |
|
169 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/lock'); |
|
170 | 170 | |
171 | 171 | $this->assertForbidden($this->client->getResponse()); |
172 | 172 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | { |
176 | 176 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
177 | 177 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
178 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/lock'); |
|
178 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/lock'); |
|
179 | 179 | |
180 | 180 | $this->assertForbidden($this->client->getResponse()); |
181 | 181 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | { |
185 | 185 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
186 | 186 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
187 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-2']->getId() . '/role/ROLE_ADMIN'); |
|
187 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-2']->getId().'/role/ROLE_ADMIN'); |
|
188 | 188 | |
189 | 189 | $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId()); |
190 | 190 | $this->assertTrue($user->hasRole('ROLE_ADMIN')); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | public function testSetUserRoleInsufficentPerms() |
200 | 200 | { |
201 | 201 | $this->logIn('ROLE_ADMIN'); |
202 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/role/ROLE_USER'); |
|
202 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/role/ROLE_USER'); |
|
203 | 203 | |
204 | 204 | $this->assertForbidden($this->client->getResponse()); |
205 | 205 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
210 | 210 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
211 | - $this->client->request('POST', '/api/users/' . UserFixtures::$users['user-1']->getId() . '/role/ROLE_USER'); |
|
211 | + $this->client->request('POST', '/api/users/'.UserFixtures::$users['user-1']->getId().'/role/ROLE_USER'); |
|
212 | 212 | |
213 | 213 | $this->assertForbidden($this->client->getResponse()); |
214 | 214 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | { |
218 | 218 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
219 | 219 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
220 | - $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-2']->getId()); |
|
220 | + $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-2']->getId()); |
|
221 | 221 | |
222 | 222 | $user = $this->em->find('Overwatch\UserBundle\Entity\User', UserFixtures::$users['user-2']->getId()); |
223 | 223 | $this->assertNull($user); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | public function testDeleteUserInsufficentPerms() |
229 | 229 | { |
230 | 230 | $this->logIn('ROLE_ADMIN'); |
231 | - $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-1']->getId()); |
|
231 | + $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-1']->getId()); |
|
232 | 232 | |
233 | 233 | $this->assertForbidden($this->client->getResponse()); |
234 | 234 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | { |
238 | 238 | $this->loginAs(UserFixtures::$users['user-1'], 'overwatchApi'); |
239 | 239 | $this->client = $this->makeClient(); //When using loginAs, we must re-create the client |
240 | - $this->client->request('DELETE', '/api/users/' . UserFixtures::$users['user-1']->getId()); |
|
240 | + $this->client->request('DELETE', '/api/users/'.UserFixtures::$users['user-1']->getId()); |
|
241 | 241 | |
242 | 242 | $this->assertForbidden($this->client->getResponse()); |
243 | 243 | } |