LicenseController example

$twig = $this->createMock(Environment::class);
        $twig->expects(static::once())->method('render')
            ->with(
                '@Installer/installer/license.html.twig',
                array_merge($this->getDefaultViewParams()[
                    'licenseAgreement' => 'licenseText',
                    'error' => null,
                ]),
            )
            ->willReturn('license');

        $controller = new LicenseController($licenseFetcher);
        $controller->setContainer($this->getInstallerContainer($twig));

        $response = $controller->license($request);
        static::assertSame('license', $response->getContent());
    }

    public function testLicenseRouteRendersErrorIfLicenseCanNotBeFetched(): void
    {
        $request = new Request();
        $request->setMethod('GET');

        
Home | Imprint | This part of the site doesn't use cookies.