SelectLanguagesController example

public function testLanguageSelectionRoute(): void
    {
        $twig = $this->createMock(Environment::class);
        $twig->expects(static::once())->method('render')
            ->with('@Installer/installer/language-selection.html.twig', $this->getDefaultViewParams())
            ->willReturn('languages');

        $notifier = $this->createMock(Notifier::class);
        $notifier->expects(static::once())->method('doTrackEvent')
            ->with(Notifier::EVENT_INSTALL_STARTED);

        $controller = new SelectLanguagesController($notifier);
        $controller->setContainer($this->getInstallerContainer($twig));

        $response = $controller->languageSelection();
        static::assertSame('languages', $response->getContent());
    }
}
Home | Imprint | This part of the site doesn't use cookies.