<?php

declare(strict_types=1);

it('redirects malformed public search query strings to a canonical url', function (): void {
    $response = $this->get('/search?amp;id=&amp;sort=&filter=&group=all&id=&page=0&page=1&q=winstep?page=1?page=1?page=1&sort=&sort=category?page=1&txtfilter=');

    $response
        ->assertStatus(301)
        ->assertRedirect('/search?q=winstep');
});