| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testListStoreApplications_() |
||
| 19 | { |
||
| 20 | $user = $this->registerAndLoginTestingDeveloper(); |
||
| 21 | |||
| 22 | factory(Application::class, 2)->create(); |
||
| 23 | |||
| 24 | factory(Application::class, 4)->create([ |
||
| 25 | 'user_id' => $user->id, |
||
| 26 | ]); |
||
| 27 | |||
| 28 | // send the HTTP request |
||
| 29 | $response = $this->apiCall($this->endpoint, 'get'); |
||
| 30 | |||
| 31 | // assert response status is correct |
||
| 32 | $this->assertEquals($response->getStatusCode(), '200'); |
||
| 33 | |||
| 34 | $responseObject = $this->getResponseObject($response); |
||
| 35 | |||
| 36 | $this->assertEquals(4, count($responseObject->data)); |
||
| 37 | } |
||
| 38 | |||
| 40 |