Fix test failures: correct ids format and anonymous access assertion

This commit is contained in:
Sebastian Almberg 2026-02-12 22:27:01 +01:00
parent be2c990286
commit 7e3aa7fed8
4 changed files with 10 additions and 9 deletions

View file

@ -28,7 +28,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
#[Group("slow")]
#[Group("DB")]
class BatchEdaControllerTest extends WebTestCase
final class BatchEdaControllerTest extends WebTestCase
{
private function loginAsUser($client, string $username): void
{
@ -48,8 +48,8 @@ class BatchEdaControllerTest extends WebTestCase
$client = static::createClient();
$this->loginAsUser($client, 'admin');
// Request with part IDs in session — the page expects ids[] query param
$client->request('GET', '/en/tools/batch_eda_edit', ['ids' => [1, 2, 3]]);
// Request with part IDs as comma-separated string (controller uses getString)
$client->request('GET', '/en/tools/batch_eda_edit', ['ids' => '1,2,3']);
self::assertResponseIsSuccessful();
}
@ -71,7 +71,7 @@ class BatchEdaControllerTest extends WebTestCase
$this->loginAsUser($client, 'admin');
// Load the form page first
$crawler = $client->request('GET', '/en/tools/batch_eda_edit', ['ids' => [1, 2]]);
$crawler = $client->request('GET', '/en/tools/batch_eda_edit', ['ids' => '1,2']);
self::assertResponseIsSuccessful();