@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Tests; |
4 | 4 | |
5 | 5 | use Silex\WebTestCase; |
6 | -use JsonSchema\Validator; |
|
7 | 6 | |
8 | 7 | class WorkspaceTest extends WebTestCase |
9 | 8 | { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | use AbstractAppTest; |
11 | 11 | |
12 | - public function testGetUser(){ |
|
12 | + public function testGetUser() { |
|
13 | 13 | $schema = __DIR__.'/../../../../api/schemas/userInfo.json'; |
14 | 14 | |
15 | 15 | $client = $this->createClient(); |
@@ -2,9 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Tests; |
4 | 4 | |
5 | -use Silex\WebTestCase; |
|
6 | -use JsonSchema\Validator; |
|
7 | - |
|
8 | 5 | class PartTest extends WorkspaceTest |
9 | 6 | { |
10 | 7 | use AbstractAppTest; |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | $client = $this->createClient(); |
21 | 21 | $client = $this->logIn2($client); |
22 | 22 | $client->request( |
23 | - 'POST', |
|
24 | - '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
25 | - [], |
|
26 | - [], |
|
27 | - ['CONTENT_TYPE' => 'application/json'], |
|
28 | - ''); |
|
23 | + 'POST', |
|
24 | + '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
25 | + [], |
|
26 | + [], |
|
27 | + ['CONTENT_TYPE' => 'application/json'], |
|
28 | + ''); |
|
29 | 29 | $response = $client->getResponse(); |
30 | 30 | $data = $client->getResponse()->getContent(); |
31 | 31 | print_r("ROBAGROSSA"); |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | $client = $this->createClient(); |
49 | 49 | $client = $this->logIn2($client); |
50 | 50 | $client->request( |
51 | - 'DELETE', |
|
52 | - '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
53 | - [], |
|
54 | - [], |
|
55 | - ['CONTENT_TYPE' => 'application/json'], |
|
56 | - ''); |
|
51 | + 'DELETE', |
|
52 | + '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
|
53 | + [], |
|
54 | + [], |
|
55 | + ['CONTENT_TYPE' => 'application/json'], |
|
56 | + ''); |
|
57 | 57 | $response = $client->getResponse(); |
58 | 58 | |
59 | 59 |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | use AbstractAppTest; |
11 | 11 | |
12 | 12 | |
13 | - public function testPostWorkspaceCheck(){ |
|
13 | + public function testPostWorkspaceCheck() { |
|
14 | 14 | $blob = $this->testPostWorkspacePart(); |
15 | 15 | $id = $blob[0]; |
16 | - $part_id= $blob[1]; |
|
16 | + $part_id = $blob[1]; |
|
17 | 17 | |
18 | 18 | print_r("FANFARA!"); |
19 | 19 | var_dump($blob); |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | $js = json_decode($data); |
34 | 34 | $points = $js->points; |
35 | 35 | |
36 | - $this->assertTrue(is_numeric($points)); //TODO verificare che il numero sia adeguato ai punti attesi |
|
36 | + $this->assertTrue(is_numeric($points)); //TODO verificare che il numero sia adeguato ai punti attesi |
|
37 | 37 | |
38 | - return [$id,$part_id]; |
|
38 | + return [$id, $part_id]; |
|
39 | 39 | } |
40 | 40 | |
41 | - public function testDeletePostWorkspaceCheck(){ |
|
41 | + public function testDeletePostWorkspaceCheck() { |
|
42 | 42 | $blob = $this->testPostWorkspaceCheck(); |
43 | 43 | $id = $blob[0]; |
44 | - $part_id= $blob[1]; |
|
44 | + $part_id = $blob[1]; |
|
45 | 45 | |
46 | 46 | print_r("FANFARA!"); |
47 | 47 | var_dump($blob); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | $response = $client->getResponse(); |
58 | 58 | |
59 | 59 | |
60 | - $this->assertEquals(204,$response->getStatusCode()); //TODO verificare che il dato non sia più presente sul server |
|
60 | + $this->assertEquals(204, $response->getStatusCode()); //TODO verificare che il dato non sia più presente sul server |
|
61 | 61 | |
62 | - return [$id,$part_id]; |
|
62 | + return [$id, $part_id]; |
|
63 | 63 | } |
64 | 64 | } |