| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function testStatistics() |
||
| 10 | { |
||
| 11 | $this->client->request('GET', '/statistics/foyer'); |
||
| 12 | $response = $this->client->getResponse(); |
||
| 13 | $this->assertJsonResponse($response, 200); |
||
| 14 | |||
| 15 | $this->client->request('GET', '/statistics/foyer/trancara'); |
||
| 16 | $response = $this->client->getResponse(); |
||
| 17 | $this->assertJsonResponse($response, 200); |
||
| 18 | |||
| 19 | $this->connect('peluchom', 'password'); |
||
| 20 | $this->client->request('POST', '/transactions', ['credit' => 20.5, 'user' => 'trancara']); |
||
| 21 | $response = $this->client->getResponse(); |
||
| 22 | $this->assertJsonResponse($response, 201); |
||
| 23 | |||
| 24 | $this->client->request('POST', '/transactions', ['credit' => -20.5, 'user' => 'trancara']); |
||
| 25 | $response = $this->client->getResponse(); |
||
| 26 | $this->assertJsonResponse($response, 201); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |