Skip to content

[LiveComponent] Testing forms causes exeption "There is currently no session available." #2177

@daFish

Description

@daFish

I'm trying to test my live component which contains a form. The following code raises an exception of type Symfony\Component\HttpFoundation\Exception\SessionNotFoundException.

My sample testcode:

$formComponent = $this->createLiveComponent(
        name: ProductionForm::class,
)->actingAs($testUser);

$formComponent->set('form_name.title', 'Loreum Ipsum');

The user and the field exist. What else is needed to get the test working?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions