public function testIndex() { $response = $this->callJSON('GET', '/api/v1/orders'); $this->assertResponseOk(); $this->assertResponseJSONValid(); $json = $this->getJSONContent(); $this->assertJSONCollectionResponse('orders'); $this->assertJSONTypes('orders[0]', $this->orderJSONFormat); $this->assertEquals(0, $json->response->offset); $this->assertEquals(Order::count(), $json->response->total); }