| @@ 71-88 (lines=18) @@ | ||
| 68 | $this->assertTrue($assert); |
|
| 69 | } |
|
| 70 | ||
| 71 | public function testDeleteBadge(){ |
|
| 72 | $client = $this->createClient(); |
|
| 73 | $client = $this->logIn($client); |
|
| 74 | ||
| 75 | $badge_id = $this->testPostBadge(); |
|
| 76 | ||
| 77 | $client->request( |
|
| 78 | 'DELETE', |
|
| 79 | '/api/v1/user/1/badge/'.$badge_id.'', |
|
| 80 | [], |
|
| 81 | [], |
|
| 82 | [], |
|
| 83 | ''); |
|
| 84 | ||
| 85 | $response = $client->getResponse(); |
|
| 86 | $this->assertEquals(204,$response->getStatusCode()); |
|
| 87 | return $badge_id; |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testPostBadgeCompleted(){ |
|
| 91 | $client = $this->createClient(); |
|
| @@ 90-107 (lines=18) @@ | ||
| 87 | return $badge_id; |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testPostBadgeCompleted(){ |
|
| 91 | $client = $this->createClient(); |
|
| 92 | $client = $this->logIn($client); |
|
| 93 | ||
| 94 | $badge_id = $this->testPostBadge(); |
|
| 95 | ||
| 96 | $client->request( |
|
| 97 | 'PATCH', |
|
| 98 | '/api/v1/user/1/badge/'.$badge_id.'/completed', |
|
| 99 | [], |
|
| 100 | [], |
|
| 101 | [], |
|
| 102 | ''); |
|
| 103 | ||
| 104 | $response = $client->getResponse(); |
|
| 105 | $this->assertEquals(204,$response->getStatusCode()); |
|
| 106 | return $badge_id; |
|
| 107 | } |
|
| 108 | ||
| 109 | public function testGetUserTicket(){ |
|
| 110 | $schema = __DIR__.'/../../../../api/schemas/ticketList.json'; |
|