Skip to content

[TwigComponent] Blocks set with TestHelper don't get evaluated #3216

@janopae

Description

@janopae

When playing with the reproducer I created for #3210, I realised InteractsWithTwigComponents::renderTwigComponent did not at all behave the way I expected:

Twig code inside blocks set using the $blocks parameter won't be evaluated. Variables won't be resolved, and Twig functions won't be executed. Instead, the resulting HTML will contain placeholders like {{ message }}.

This means that at the current state of the helper, basic interactions of components with their blocks can't be tested: You can't test if variables are being passed correctly or if their content is right.

This is a feature request to allow some form of testing the variables Twig components pass to their blocks.

#3211 would be a way to implement this, as it would enable evaluation of the blocks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)TwigComponent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions