getRequestDataBag example

$this->browser->request(
            'POST',
            $this->testBaseUrl . '/checkout/configure',
            ['languageId' => $this->languageId]
        );

        $response = $this->browser->getResponse();

        $dispatcher->removeSubscriber($contextSubscriber);

        static::assertSame(200, $response->getStatusCode()$response->getContent() ?: '');
        static::assertSame($this->languageId, $contextSubscriber->switchEvent->getRequestDataBag()->get('languageId'));
    }
}

/** * @internal */
class ContextControllerTestSubscriber implements EventSubscriberInterface
{
    public SalesChannelContextSwitchEvent $switchEvent;

    public static function getSubscribedEvents(): array
    {
Home | Imprint | This part of the site doesn't use cookies.