$type) { Report::write($village->player_id, $type, ['n' => $i], $at->addMinutes($i)); } $attacks = app(Reports::class)->list(owner($village), $village->world_id, 1, 'attack'); $all = app(Reports::class)->list(owner($village), $village->world_id); expect(array_column($attacks['reports'], 'type'))->toBe(['attack', 'attack']) ->and($attacks['unread'])->toBe(4) ->and($all['reports'])->toHaveCount(4) ->and($all['reports'][0]['payload'])->toBe(['n' => 3]); });