DatabaseImportController example

private MockObject&Environment $twig;

    private MockObject&RouterInterface $router;

    protected function setUp(): void
    {
        $this->connectionFactory = $this->createMock(DatabaseConnectionFactory::class);
        $this->databaseMigrator = $this->createMock(DatabaseMigrator::class);
        $this->twig = $this->createMock(Environment::class);
        $this->router = $this->createMock(RouterInterface::class);

        $this->controller = new DatabaseImportController(
            $this->connectionFactory,
            $this->databaseMigrator
        );
        $this->controller->setContainer($this->getInstallerContainer($this->twig, ['router' => $this->router]));
    }

    /** * @after */
    public function unsetEnvVars(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.