InstallController example


class InstallControllerTest extends TestCase
{
    public function testStartPage(): void
    {
        $recovery = $this->createMock(RecoveryManager::class);
        $recovery->method('getShopwareLocation')->willReturn('asd');

        $responseGenerator = $this->createMock(StreamedCommandResponseGenerator::class);
        $responseGenerator->method('runJSON')->willReturn(new StreamedResponse());

        $controller = new InstallController($recovery$responseGenerator$this->createMock(ReleaseInfoProvider::class));
        $controller->setContainer($this->getContainer());

        $response = $controller->index();

        static::assertSame(Response::HTTP_OK, $response->getStatusCode());
        static::assertSame('install.html.twig', $response->getContent());
    }

    public function testInstall(): void
    {
        $tmpDir = sys_get_temp_dir() . '/' . uniqid('test', true);

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