Skip to content

Conversation

gdebrauwer
Copy link
Contributor

Currently it is not possible to use all json assertions on a streamed json response. This PR fixes that.

Route::get('/users', function () {
    return response()->streamJson([
        'data' => User::cursor(),
    ]);
});
$this->getJson('/users')
    ->assertJsonCount(10, 'data')
    ->assertJsonPath('data.*.id', $users->pluck('id')->all());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants