@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | use AbstractAppTest; |
| 11 | 11 | |
| 12 | - public function testGetWorkspaceList(){ |
|
| 12 | + public function testGetWorkspaceList() { |
|
| 13 | 13 | $schema = __DIR__.'/../../../../api/schemas/workspaceList.json'; |
| 14 | 14 | |
| 15 | 15 | //$client = $this->createClient(); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | if ($validator->isValid()) { |
| 57 | 57 | echo "The supplied JSON validates against the schema.\n"; |
| 58 | 58 | $assert = true; |
| 59 | - } else { |
|
| 59 | + }else { |
|
| 60 | 60 | echo "JSON does not validate. Violations:\n"; |
| 61 | 61 | foreach ($validator->getErrors() as $error) { |
| 62 | 62 | echo "[{$error['property']}] {$error['message']}\n"; |
@@ -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; |
@@ -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 | } |