File tree Expand file tree Collapse file tree1 file changed +8
-0
lines changed
tests/Integration/EventListener Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \UX \LiveComponent \Tests \Integration ;
13
13
14
14
use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
15
+ use Symfony \Component \HttpFoundation \Request ;
15
16
use Symfony \UX \TwigComponent \ComponentRenderer ;
16
17
17
18
final class DataModelPropsSubscriberTest extends KernelTestCase
18
19
{
19
20
public function testDataModelPropsAreSharedToChild (): void
20
21
{
22
+ // work around so that a session is available so CSRF doesn't fail
23
+ $ session = self ::getContainer ()->get ('session.factory ' )->createSession ();
24
+ $ request = Request::create ('/ ' );
25
+ $ request ->setSession ($ session );
26
+ $ requestStack = self ::getContainer ()->get ('request_stack ' );
27
+ $ requestStack ->push ($ request );
28
+
21
29
/** @var ComponentRenderer $renderer */
22
30
$ renderer = self ::getContainer ()->get ('ux.twig_component.component_renderer ' );
23
31
You can’t perform that action at this time.
0 commit comments