EnvConfigWriter example

unlink(__DIR__ . '/_fixtures/.env');
        unlink(__DIR__ . '/_fixtures/.env.local');
        unlink(__DIR__ . '/_fixtures/public/.htaccess');
    }

    public function testWriteConfig(): void
    {
        $idGenerator = $this->createMock(UniqueIdGenerator::class);
        $idGenerator->expects(static::once())->method('getUniqueId')
            ->willReturn('1234567890');

        $writer = new EnvConfigWriter(__DIR__ . '/_fixtures', $idGenerator);

        $info = new DatabaseConnectionInformation();
        $info->assign([
            'hostname' => 'localhost',
            'port' => 3306,
            'username' => 'root',
            'password' => 'root',
            'databaseName' => 'shopware',
        ]);

        $writer->writeConfig($info[
            
Home | Imprint | This part of the site doesn't use cookies.