withoutExceptionHandling(); $this->post( action([WebsocketStatisticsEntriesController::class, 'store']), $this->payload() ); $entries = WebSocketsStatisticsEntry::get(); $this->assertCount(1, $entries); $this->assertArraySubset($this->payload(), $entries->first()->attributesToArray()); } protected function payload(): array { return [ 'app_id' => config('websockets.apps.0.id'), 'peak_connections' => 1, 'websocket_message_count' => 2, 'api_message_count' => 3, ]; } }