@@ 11-25 (lines=15) @@ | ||
8 | ||
9 | ||
10 | /*verifico che una parte si possa scaricare correttamente*/ |
|
11 | public function testGetWorkspacePart() { |
|
12 | $schema = __DIR__.'/../../../../api/schemas/part.json'; |
|
13 | ||
14 | $client = $this->createClient(); |
|
15 | $client = $this->logIn($client); |
|
16 | ||
17 | $crawler = $client->request('GET', '/api/v1/workspace/6/part/1'); |
|
18 | $response = $client->getResponse(); |
|
19 | ||
20 | //print_r($response); |
|
21 | $data = $client->getResponse()->getContent(); |
|
22 | $validator = $this->askValidation($data, $schema); |
|
23 | ||
24 | $assert = $this->evalValidation($validator); |
|
25 | $this->assertTrue($assert); |
|
26 | } |
|
27 | ||
28 |
@@ 12-27 (lines=16) @@ | ||
9 | use AbstractAppTest; |
|
10 | ||
11 | /*Verifico che il Workspace si possa scaricare correttamente*/ |
|
12 | public function testGetWorkSpace() { |
|
13 | $schema = __DIR__.'/../../../../api/schemas/workspace.json'; |
|
14 | ||
15 | $client = $this->createClient(); |
|
16 | $client = $this->logIn($client); |
|
17 | ||
18 | $crawler = $client->request('GET', '/api/v1/workspace/1'); |
|
19 | $response = $client->getResponse(); |
|
20 | $data = $client->getResponse()->getContent(); |
|
21 | $validator = $this->askValidation($data, $schema); |
|
22 | ||
23 | $assert = $this->evalValidation($validator); |
|
24 | $this->assertTrue($assert); |
|
25 | ||
26 | return $data; |
|
27 | } |
|
28 | /*Verifico che l'elenco dei workspace si possa scaricare correttamente*/ |
|
29 | ||
30 | /** |
|
@@ 33-48 (lines=16) @@ | ||
30 | /** |
|
31 | * @return string |
|
32 | */ |
|
33 | public function testGetWorkspaceList(){ |
|
34 | $schema = __DIR__.'/../../../../api/schemas/workspaceList.json'; |
|
35 | ||
36 | $client = $this->createClient(); |
|
37 | $client = $this->logIn($client); |
|
38 | ||
39 | $crawler = $client->request('GET', '/api/v1/workspace/'); |
|
40 | $response = $client->getResponse(); |
|
41 | ||
42 | $data = $client->getResponse()->getContent(); |
|
43 | $validator = $this->askValidation($data, $schema); |
|
44 | ||
45 | $assert = $this->evalValidation($validator); |
|
46 | $this->assertTrue($assert); |
|
47 | return $data; |
|
48 | } |
|
49 | /*verifico che si possa condividere il workspace */ |
|
50 | public function testGetWorkspaceShare() { |
|
51 | $schema = __DIR__.'/../../../../api/schemas/workspaceShare.json'; |
|
@@ 50-63 (lines=14) @@ | ||
47 | return $data; |
|
48 | } |
|
49 | /*verifico che si possa condividere il workspace */ |
|
50 | public function testGetWorkspaceShare() { |
|
51 | $schema = __DIR__.'/../../../../api/schemas/workspaceShare.json'; |
|
52 | ||
53 | $client = $this->createClient(); |
|
54 | $client = $this->logIn($client); |
|
55 | ||
56 | $crawler = $client->request('GET', '/api/v1/workspace/1/share'); |
|
57 | $response = $client->getResponse(); |
|
58 | ||
59 | //print_r($response); |
|
60 | $data = $client->getResponse()->getContent(); |
|
61 | $validator = $this->askValidation($data, $schema); |
|
62 | ||
63 | $assert = $this->evalValidation($validator); |
|
64 | $this->assertTrue($assert); |
|
65 | } |
|
66 |
@@ 12-27 (lines=16) @@ | ||
9 | { |
|
10 | use AbstractAppTest; |
|
11 | ||
12 | public function testGetUser(){ |
|
13 | $schema = __DIR__.'/../../../../api/schemas/userInfo.json'; |
|
14 | ||
15 | $client = $this->createClient(); |
|
16 | $client = $this->logIn($client); |
|
17 | ||
18 | $crawler = $client->request('GET', '/api/v1/user/1'); |
|
19 | $response = $client->getResponse(); |
|
20 | ||
21 | //print_r($response); |
|
22 | $data = $client->getResponse()->getContent(); |
|
23 | $validator = $this->askValidation($data, $schema); |
|
24 | ||
25 | $assert = $this->evalValidation($validator); |
|
26 | $this->assertTrue($assert); |
|
27 | } |
|
28 | ||
29 | public function testPostBadge(){ |
|
30 | $client = $this->createClient(); |
|
@@ 109-124 (lines=16) @@ | ||
106 | return $badge_id; |
|
107 | } |
|
108 | ||
109 | public function testGetUserTicket(){ |
|
110 | $schema = __DIR__.'/../../../../api/schemas/ticketList.json'; |
|
111 | ||
112 | $client = $this->createClient(); |
|
113 | $client = $this->logIn($client); |
|
114 | ||
115 | $crawler = $client->request('GET', '/api/v1/user/1/ticket'); |
|
116 | $response = $client->getResponse(); |
|
117 | ||
118 | //print_r($response); |
|
119 | $data = $client->getResponse()->getContent(); |
|
120 | $validator = $this->askValidation($data, $schema); |
|
121 | ||
122 | $assert = $this->evalValidation($validator); |
|
123 | $this->assertTrue($assert); |
|
124 | } |
|
125 | } |
|
126 |