3 namespace Friendica\Test\src\Core\Console;
5 use Friendica\Core\Config\Cache\ConfigCache;
6 use Friendica\Core\Console\AutomaticInstallation;
7 use Friendica\Core\Installer;
8 use Friendica\Core\Logger;
9 use Friendica\Test\Util\DBAMockTrait;
10 use Friendica\Test\Util\DBStructureMockTrait;
11 use Friendica\Test\Util\L10nMockTrait;
12 use Friendica\Test\Util\RendererMockTrait;
13 use Friendica\Util\Logger\VoidLogger;
14 use org\bovigo\vfs\vfsStream;
15 use org\bovigo\vfs\vfsStreamFile;
20 class AutomaticInstallationConsoleTest extends ConsoleTest
24 use DBStructureMockTrait;
25 use RendererMockTrait;
34 * @var vfsStreamFile Assert file without DB credentials
38 * @var vfsStreamFile Assert file with DB credentials
40 private $assertFileDb;
42 public function setUp()
46 if ($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php')) {
47 $this->root->getChild('config')
48 ->removeChild('local.config.php');
51 $this->db_host = getenv('MYSQL_HOST');
52 $this->db_port = !empty(getenv('MYSQL_PORT')) ? getenv('MYSQL_PORT') : null;
53 $this->db_data = getenv('MYSQL_DATABASE');
54 $this->db_user = getenv('MYSQL_USERNAME') . getenv('MYSQL_USER');
55 $this->db_pass = getenv('MYSQL_PASSWORD');
61 * Returns the dataset for each automatic installation test
63 * @return array the dataset
65 public function dataInstaller()
87 'default_timezone' => '',
95 'hostname' => getenv('MYSQL_HOST'),
96 'port' =>!empty(getenv('MYSQL_PORT')) ? getenv('MYSQL_PORT') : null,
97 'username' => getenv('MYSQL_USERNAME'),
98 'password' => getenv('MYSQL_PASSWORD'),
99 'database' => getenv('MYSQL_DATABASE'),
103 'hostname' => 'friendica.local',
104 'admin_email' => 'admin@philipp.info',
107 'urlpath' => 'test/it',
108 'url' => 'friendica.local/test/it',
111 'default_timezone' => 'en',
112 'language' => 'Europe/Berlin',
119 private function assertFinished($txt, $withconfig = false, $copyfile = false)
127 Creating config file...
137 Copying config file...
144 Initializing setup...
149 Checking environment...
151 NOTICE: Not checking .htaccess/URL-Rewrite during CLI installation.
162 Inserting data into database...
173 Installation is finished
177 $this->assertEquals($finished, $txt);
180 private function assertStuckDB($txt)
183 Initializing setup...
188 Checking environment...
190 NOTICE: Not checking .htaccess/URL-Rewrite during CLI installation.
195 Creating config file...
203 Could not connect to database.:
208 $this->assertEquals($finished, $txt);
212 * Test the automatic installation without any parameter/setting
214 public function testEmpty()
216 $configCache = new ConfigCache();
217 $configCache->set('system', 'basepath', $this->root->url());
218 $configCache->set('config', 'php_path', trim(shell_exec('which php')));
220 $this->mockApp($this->root, null, true);
222 $this->configMock->shouldReceive('set')->andReturnUsing(function ($cat, $key, $value) use ($configCache) {
223 if ($key !== 'basepath') {
224 return $configCache->set($cat, $key, $value);
229 $this->configMock->shouldReceive('has')->andReturn(true);
230 $this->configMock->shouldReceive('get')->andReturnUsing(function ($cat, $key) use ($configCache) {
231 return $configCache->get($cat, $key);
234 $this->mockConnect(true, 1);
235 $this->mockConnected(true, 1);
236 $this->mockExistsTable('user', false, 1);
237 $this->mockUpdate([$this->root->url(), false, true, true], null, 1);
239 $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
240 $this->mockReplaceMacros('testTemplate', \Mockery::any(), '', 1);
242 $console = new AutomaticInstallation($this->consoleArgv);
244 $txt = $this->dumpExecute($console);
246 $this->assertFinished($txt, true, false);
247 $this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
249 // Assert the default values without any config
250 $this->assertEquals(Installer::DEFAULT_HOST, $configCache->get('database', 'hostname'));
251 $this->assertEmpty($configCache->get('database', 'username'));
252 $this->assertEmpty($configCache->get('database', 'password'));
253 $this->assertEmpty($configCache->get('database', 'database'));
255 $this->assertEmpty($configCache->get('config', 'hostname'), $configCache->get('config', 'hostname'));
256 $this->assertEmpty($configCache->get('config', 'admin_email'), $configCache->get('config', 'admin_email'));
257 $this->assertEquals(trim(shell_exec('which php')), $configCache->get('config', 'php_path'));
259 $this->assertEquals(Installer::DEFAULT_TZ, $configCache->get('system', 'default_timezone'));
260 $this->assertEquals(Installer::DEFAULT_LANG, $configCache->get('system', 'language'));
261 $this->assertEquals(SSL_POLICY_NONE, $configCache->get('system', 'ssl_policy'));
262 $this->assertEmpty($configCache->get('system', 'urlpath'), $configCache->get('system', 'urlpath'));
263 $this->assertEquals($this->root->url(), $configCache->get('system', 'basepath'));
267 * Test the automatic installation with a prepared config file
268 * @dataProvider dataInstaller
270 public function testWithConfig(array $data)
272 $configCache = new ConfigCache();
273 $configCache->load($data);
274 $configCache->set('system', 'basepath', $this->root->url());
275 $configCache->set('config', 'php_path', trim(shell_exec('which php')));
277 $this->mockApp($this->root, $configCache, true);
278 $this->mode->shouldReceive('isInstall')->andReturn(false);
279 Logger::init(new VoidLogger());
281 $this->mockConnect(true, 1);
282 $this->mockConnected(true, 1);
283 $this->mockExistsTable('user', false, 1);
284 $this->mockUpdate([$this->root->url(), false, true, true], null, 1);
286 $conf = function ($cat, $key) use ($configCache) {
287 return $configCache->get($cat, $key);
293 // Local configuration
295 // If you're unsure about what any of the config keys below do, please check the config/defaults.config.php for detailed
296 // documentation of their data type and behavior.
300 'hostname' => '{$conf('database','hostname')}',
301 'username' => '{$conf('database', 'username')}',
302 'password' => '{$conf('database', 'password')}',
303 'database' => '{$conf('database', 'database')}',
304 'charset' => 'utf8mb4',
307 // ****************************************************************
308 // The configuration below will be overruled by the admin panel.
309 // Changes made below will only have an effect if the database does
310 // not contain any configuration for the friendica system.
311 // ****************************************************************
314 'admin_email' => '{$conf('config', 'admin_email')}',
315 'hostname' => '{$conf('config', 'hostname')}',
316 'sitename' => 'Friendica Social Network',
317 'register_policy' => \Friendica\Module\Register::OPEN,
318 'register_text' => '',
321 'basepath => '{$conf('system', 'basepath')}',
322 'urlpath => '{$conf('system', 'urlpath')}',
323 'url' => '{$conf('system', 'url')}',
324 'default_timezone' => '{$conf('system', 'default_timezone')}',
325 'language' => '{$conf('system', 'language')}',
330 vfsStream::newFile('prepared.config.php')
332 ->setContent($config);
334 $console = new AutomaticInstallation($this->consoleArgv);
335 $console->setOption('f', 'prepared.config.php');
337 $txt = $this->dumpExecute($console);
339 $this->assertFinished($txt, false, true);
341 $this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
342 $this->assertEquals($config, file_get_contents($this->root->getChild('config' . DIRECTORY_SEPARATOR . 'local.config.php')->url()));
346 * Test the automatic installation with environment variables
347 * Includes saving the DB credentials to the file
348 * @dataProvider dataInstaller
350 public function testWithEnvironmentAndSave(array $data)
352 $configCache = new ConfigCache();
353 $configCache->set('system', 'basepath', $this->root->url());
354 $configCache->set('config', 'php_path', trim(shell_exec('which php')));
356 $this->mockApp($this->root, null, true);
358 $this->configMock->shouldReceive('set')->andReturnUsing(function ($cat, $key, $value) use ($configCache) {
359 if ($key !== 'basepath') {
360 return $configCache->set($cat, $key, $value);
365 $this->configMock->shouldReceive('has')->andReturn(true);
366 $this->configMock->shouldReceive('get')->andReturnUsing(function ($cat, $key) use ($configCache) {
367 return $configCache->get($cat, $key);
370 $this->mockConnect(true, 1);
371 $this->mockConnected(true, 1);
372 $this->mockExistsTable('user', false, 1);
373 $this->mockUpdate([$this->root->url(), false, true, true], null, 1);
375 $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
376 $this->mockReplaceMacros('testTemplate', \Mockery::any(), '', 1);
378 $this->assertTrue(putenv('MYSQL_HOST=' . $data['database']['hostname']));
379 $this->assertTrue(putenv('MYSQL_PORT=' . $data['database']['port']));
380 $this->assertTrue(putenv('MYSQL_DATABASE=' . $data['database']['database']));
381 $this->assertTrue(putenv('MYSQL_USERNAME=' . $data['database']['username']));
382 $this->assertTrue(putenv('MYSQL_PASSWORD=' . $data['database']['password']));
384 $this->assertTrue(putenv('FRIENDICA_URL_PATH=' . $data['system']['urlpath']));
385 $this->assertTrue(putenv('FRIENDICA_BASE_PATH=' . $data['system']['basepath']));
386 $this->assertTrue(putenv('FRIENDICA_PHP_PATH=' . $data['config']['php_path']));
387 $this->assertTrue(putenv('FRIENDICA_SSL_POLICY=' . $data['system']['ssl_policy']));
388 $this->assertTrue(putenv('FRIENDICA_HOSTNAME=' . $data['config']['hostname']));
389 $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=' . $data['config']['admin_email']));
390 $this->assertTrue(putenv('FRIENDICA_TZ=' . $data['system']['default_timezone']));
391 $this->assertTrue(putenv('FRIENDICA_LANG=' . $data['system']['language']));
393 $console = new AutomaticInstallation($this->consoleArgv);
394 $console->setOption('savedb', true);
396 $txt = $this->dumpExecute($console);
398 // Assert the default values without any config
399 $dbhost = $data['database']['hostname'] . (!empty($data['database']['port']) ? ':' . $data['database']['port'] : '');
400 $this->assertEquals($dbhost, $configCache->get('database', 'hostname'));
401 $this->assertEquals($data['database']['username'], $configCache->get('database', 'username'));
402 $this->assertEquals($data['database']['database'], $configCache->get('database', 'database'));
403 $this->assertEquals($data['database']['password'], $configCache->get('database', 'password'));
405 $this->assertEquals($data['config']['hostname'], $configCache->get('config', 'hostname'));
406 $this->assertEquals($data['config']['admin_email'], $configCache->get('config', 'admin_email'));
407 $this->assertEquals(trim(shell_exec('which php')), $configCache->get('config', 'php_path'));
409 $this->assertEquals((!empty($data['system']['default_timezone']) ? $data['system']['default_timezone'] : Installer::DEFAULT_TZ),
410 $configCache->get('system', 'default_timezone'));
411 $this->assertEquals((!empty($data['system']['language']) ? $data['system']['language'] : Installer::DEFAULT_LANG),
412 $configCache->get('system', 'language'));
413 $this->assertEquals((!empty($data['system']['ssl_policy']) ? $data['system']['ssl_policy'] : SSL_POLICY_NONE),
414 $configCache->get('system', 'ssl_policy'));
415 $this->assertEquals((!empty($data['system']['urlpath']) ? $data['system']['urlpath'] : null),
416 $configCache->get('system', 'urlpath'));
418 $this->assertFinished($txt, true);
422 * Test the automatic installation with environment variables
423 * Don't save the db credentials to the file
424 * @dataProvider dataInstaller
426 public function testWithEnvironmentWithoutSave(array $data)
428 $configCache = new ConfigCache();
429 $configCache->set('system', 'basepath', $this->root->url());
430 $configCache->set('config', 'php_path', trim(shell_exec('which php')));
432 $this->mockApp($this->root, null, true);
434 $this->configMock->shouldReceive('set')->andReturnUsing(function ($cat, $key, $value) use ($configCache) {
435 if ($key !== 'basepath') {
436 return $configCache->set($cat, $key, $value);
441 $this->configMock->shouldReceive('has')->andReturn(true);
442 $this->configMock->shouldReceive('get')->andReturnUsing(function ($cat, $key) use ($configCache) {
443 return $configCache->get($cat, $key);
446 $this->mockConnect(true, 1);
447 $this->mockConnected(true, 1);
448 $this->mockExistsTable('user', false, 1);
449 $this->mockUpdate([$this->root->url(), false, true, true], null, 1);
451 $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
452 $this->mockReplaceMacros('testTemplate', \Mockery::any(), '', 1);
454 $this->assertTrue(putenv('MYSQL_HOST=' . $data['database']['hostname']));
455 $this->assertTrue(putenv('MYSQL_PORT=' . $data['database']['port']));
456 $this->assertTrue(putenv('MYSQL_DATABASE=' . $data['database']['database']));
457 $this->assertTrue(putenv('MYSQL_USERNAME=' . $data['database']['username']));
458 $this->assertTrue(putenv('MYSQL_PASSWORD=' . $data['database']['password']));
460 $this->assertTrue(putenv('FRIENDICA_URL_PATH=' . $data['system']['urlpath']));
461 $this->assertTrue(putenv('FRIENDICA_BASE_PATH=' . $data['system']['basepath']));
462 $this->assertTrue(putenv('FRIENDICA_PHP_PATH=' . $data['config']['php_path']));
463 $this->assertTrue(putenv('FRIENDICA_SSL_POLICY=' . $data['system']['ssl_policy']));
464 $this->assertTrue(putenv('FRIENDICA_HOSTNAME=' . $data['config']['hostname']));
465 $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=' . $data['config']['admin_email']));
466 $this->assertTrue(putenv('FRIENDICA_TZ=' . $data['system']['default_timezone']));
467 $this->assertTrue(putenv('FRIENDICA_LANG=' . $data['system']['language']));
469 $console = new AutomaticInstallation($this->consoleArgv);
471 $txt = $this->dumpExecute($console);
473 $this->assertEquals(Installer::DEFAULT_HOST, $configCache->get('database', 'hostname'));
474 $this->assertEmpty($configCache->get('database', 'username'), $configCache->get('database', 'username'));
475 $this->assertEmpty($configCache->get('database', 'password'), $configCache->get('database', 'password'));
476 $this->assertEmpty($configCache->get('database', 'database'), $configCache->get('database', 'database'));
478 $this->assertEquals($data['config']['hostname'], $configCache->get('config', 'hostname'));
479 $this->assertEquals($data['config']['admin_email'], $configCache->get('config', 'admin_email'));
480 $this->assertEquals(trim(shell_exec('which php')), $configCache->get('config', 'php_path'));
482 $this->assertEquals((!empty($data['system']['default_timezone']) ? $data['system']['default_timezone'] : Installer::DEFAULT_TZ),
483 $configCache->get('system', 'default_timezone'));
484 $this->assertEquals((!empty($data['system']['language']) ? $data['system']['language'] : Installer::DEFAULT_LANG),
485 $configCache->get('system', 'language'));
486 $this->assertEquals((!empty($data['system']['ssl_policy']) ? $data['system']['ssl_policy'] : SSL_POLICY_NONE),
487 $configCache->get('system', 'ssl_policy'));
488 $this->assertEquals((!empty($data['system']['urlpath']) ? $data['system']['urlpath'] : null),
489 $configCache->get('system', 'urlpath'));
491 $this->assertFinished($txt, true);
495 * Test the automatic installation with arguments
496 * @dataProvider dataInstaller
498 public function testWithArguments(array $data)
500 $configCache = new ConfigCache();
501 $configCache->set('system', 'basepath', $this->root->url());
502 $configCache->set('config', 'php_path', trim(shell_exec('which php')));
504 $this->mockApp($this->root, null, true);
506 $this->configMock->shouldReceive('set')->andReturnUsing(function ($cat, $key, $value) use ($configCache) {
507 if ($key !== 'basepath') {
508 return $configCache->set($cat, $key, $value);
513 $this->configMock->shouldReceive('has')->andReturn(true);
514 $this->configMock->shouldReceive('get')->andReturnUsing(function ($cat, $key) use ($configCache) {
515 return $configCache->get($cat, $key);
518 $this->mockConnect(true, 1);
519 $this->mockConnected(true, 1);
520 $this->mockExistsTable('user', false, 1);
521 $this->mockUpdate([$this->root->url(), false, true, true], null, 1);
523 $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
524 $this->mockReplaceMacros('testTemplate', \Mockery::any(), '', 1);
526 $console = new AutomaticInstallation($this->consoleArgv);
528 if (!empty($data['database']['hostname'])) {
529 $console->setOption('dbhost', $data['database']['hostname']);
531 if (!empty($data['database']['port'])) {
532 $console->setOption('dbport', $data['database']['port']);
534 if (!empty($data['database']['username'])) {
535 $console->setOption('dbuser', $data['database']['username']);
537 if (!empty($data['database']['password'])) {
538 $console->setOption('dbpass', $data['database']['password']);
540 if (!empty($data['database']['database'])) {
541 $console->setOption('dbdata', $data['database']['database']);
543 if (!empty($data['system']['urlpath'])) {
544 $console->setOption('urlpath', $data['system']['urlpath']);
546 if (!empty($data['system']['basepath'])) {
547 $console->setOption('basepath', $data['system']['basepath']);
549 if (!empty($data['config']['php_path'])) {
550 $console->setOption('phppath', $data['config']['php_path']);
552 if (!empty($data['system']['ssl_policy'])) {
553 $console->setOption('sslpolicy', $data['system']['ssl_policy']);
555 if (!empty($data['config']['hostname'])) {
556 $console->setOption('hostname', $data['config']['hostname']);
558 if (!empty($data['config']['admin_email'])) {
559 $console->setOption('admin', $data['config']['admin_email']);
561 if (!empty($data['system']['default_timezone'])) {
562 $console->setOption('tz', $data['system']['default_timezone']);
564 if (!empty($data['system']['language'])) {
565 $console->setOption('lang', $data['system']['language']);
568 $txt = $this->dumpExecute($console);
570 $dbhost = (!empty($data['database']['hostname'])) ? $data['database']['hostname'] : Installer::DEFAULT_HOST;
571 $dbhost .= (!empty($data['database']['port']) ? ':' . $data['database']['port'] : '');
572 $this->assertEquals($dbhost, $configCache->get('database', 'hostname'));
573 $this->assertEquals($data['database']['username'], $configCache->get('database', 'username'));
574 $this->assertEquals($data['database']['database'], $configCache->get('database', 'database'));
575 $this->assertEquals($data['database']['password'], $configCache->get('database', 'password'));
577 $this->assertEquals($data['config']['hostname'], $configCache->get('config', 'hostname'));
578 $this->assertEquals($data['config']['admin_email'], $configCache->get('config', 'admin_email'));
579 $this->assertEquals(trim(shell_exec('which php')), $configCache->get('config', 'php_path'));
581 $this->assertEquals((!empty($data['system']['default_timezone']) ? $data['system']['default_timezone'] : Installer::DEFAULT_TZ),
582 $configCache->get('system', 'default_timezone'));
583 $this->assertEquals((!empty($data['system']['language']) ? $data['system']['language'] : Installer::DEFAULT_LANG),
584 $configCache->get('system', 'language'));
585 $this->assertEquals((!empty($data['system']['ssl_policy']) ? $data['system']['ssl_policy'] : SSL_POLICY_NONE),
586 $configCache->get('system', 'ssl_policy'));
587 $this->assertEquals((!empty($data['system']['urlpath']) ? $data['system']['urlpath'] : null),
588 $configCache->get('system', 'urlpath'));
590 $this->assertFinished($txt, true);
594 * @runTestsInSeparateProcesses
595 * @preserveGlobalState disabled
597 public function testNoDatabaseConnection()
599 $this->mockConnect(false, 1);
601 $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
602 $this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
604 $this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
605 $this->assertTrue(putenv('FRIENDICA_TZ=Europe/Berlin'));
606 $this->assertTrue(putenv('FRIENDICA_LANG=de'));
607 $this->assertTrue(putenv('FRIENDICA_URL_PATH=/friendica'));
609 $console = new AutomaticInstallation($this->consoleArgv);
611 $txt = $this->dumpExecute($console);
613 $this->assertStuckDB($txt);
616 public function testGetHelp()
618 // Usable to purposely fail if new commands are added without taking tests into account
620 Installation - Install Friendica automatically
622 bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f]
625 Installs Friendica with data based on the local.config.php file or environment variables
628 Not checking .htaccess/URL-Rewrite during CLI installation.
631 -h|--help|-? Show help information
632 -v Show more debug information.
633 -a All setup checks are required (except .htaccess)
634 -f|--file <config> prepared config file (e.g. "config/local.config.php" itself) which will override every other config option - except the environment variables)
635 -s|--savedb Save the DB credentials to the file (if environment variables is used)
636 -H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST)
637 -p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT)
638 -d|--dbdata <database> The name of the mysql/mariadb database (env MYSQL_DATABASE)
639 -U|--dbuser <username> The username of the mysql/mariadb database login (env MYSQL_USER or MYSQL_USERNAME)
640 -P|--dbpass <password> The password of the mysql/mariadb database login (env MYSQL_PASSWORD)
641 -U|--urlpath <url_path> The URL path of Friendica - f.e. '/friendica' (env FRIENDICA_URL_PATH)
642 -B|--phppath <php_path> The path of the PHP binary (env FRIENDICA_PHP_PATH)
643 -b|--basepath <base_path> The basepath of Friendica(env FRIENDICA_BASE_PATH)
644 -S|--sslpolicy <ssl_policy> The SSL policy of Friendica (env FRIENDICA_SSL_POLICY)
645 -n|--hostname <hostname> The hostname of Friendica (env FRIENDICA_PHP_HOSTNAME)
646 -t|--tz <timezone> The timezone of Friendica (env FRIENDICA_TZ)
647 -L|--lang <language> The language of Friendica (env FRIENDICA_LANG)
649 Environment variables
650 MYSQL_HOST The host of the mysql/mariadb database (mandatory if mysql and environment is used)
651 MYSQL_PORT The port of the mysql/mariadb database
652 MYSQL_USERNAME|MYSQL_USER The username of the mysql/mariadb database login (MYSQL_USERNAME is for mysql, MYSQL_USER for mariadb)
653 MYSQL_PASSWORD The password of the mysql/mariadb database login
654 MYSQL_DATABASE The name of the mysql/mariadb database
655 FRIENDICA_URL_PATH The URL path of Friendica (f.e. '/friendica') - leave empty for auto detection
656 FRIENDICA_PHP_PATH The path of the PHP binary - leave empty for auto detection
657 FRIENDICA_BASE_PATH The basepath of Friendica - leave empty for auto detection
658 FRIENDICA_ADMIN_MAIL The admin email address of Friendica (this email will be used for admin access)
659 FRIENDICA_SSL_POLICY The SSL policy of Friendica (default is NO SSL)
660 FRIENDICA_HOSTNAME The hostname of Friendica - leave empty for auto detection
661 FRIENDICA_TZ The timezone of Friendica
662 FRIENDICA_LANG The langauge of Friendica
665 bin/console autoinstall -f 'input.config.php
666 Installs Friendica with the prepared 'input.config.php' file
668 bin/console autoinstall --savedb
669 Installs Friendica with environment variables and saves them to the 'config/local.config.php' file
671 bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica
672 Installs Friendica with a local mysql database with credentials
676 $console = new AutomaticInstallation($this->consoleArgv);
677 $console->setOption('help', true);
679 $txt = $this->dumpExecute($console);
681 $this->assertEquals($txt, $theHelp);