From 54ee36a6aaf9184aeddeb5cfd7ae615c3724b493 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 14 Dec 2024 08:16:37 +0000 Subject: [PATCH] Rename ConsoleTest to ConsoleTestCase --- .../Console/ConsoleTest.php => ConsoleTestCase.php} | 4 ++-- .../src/Console/AutomaticInstallationConsoleTest.php | 11 ++++++----- tests/src/Console/ConfigConsoleTest.php | 3 ++- tests/src/Console/LockConsoleTest.php | 3 ++- tests/src/Console/ServerBlockConsoleTest.php | 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) rename tests/{src/Console/ConsoleTest.php => ConsoleTestCase.php} (90%) diff --git a/tests/src/Console/ConsoleTest.php b/tests/ConsoleTestCase.php similarity index 90% rename from tests/src/Console/ConsoleTest.php rename to tests/ConsoleTestCase.php index 5384076c73..05febcd735 100644 --- a/tests/src/Console/ConsoleTest.php +++ b/tests/ConsoleTestCase.php @@ -5,13 +5,13 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -namespace Friendica\Test\src\Console; +namespace Friendica\Test; use Asika\SimpleConsole\Console; use Friendica\Test\MockedTestCase; use Friendica\Test\Util\Intercept; -abstract class ConsoleTest extends MockedTestCase +abstract class ConsoleTestCase extends MockedTestCase { /** * @var array The default argv for a Console Instance diff --git a/tests/src/Console/AutomaticInstallationConsoleTest.php b/tests/src/Console/AutomaticInstallationConsoleTest.php index c5d466eb11..0c2ffe1072 100644 --- a/tests/src/Console/AutomaticInstallationConsoleTest.php +++ b/tests/src/Console/AutomaticInstallationConsoleTest.php @@ -16,6 +16,7 @@ use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Database\Database; use Friendica\DI; +use Friendica\Test\ConsoleTestCase; use Friendica\Test\Util\RendererMockTrait; use Friendica\Test\Util\VFSTrait; use Mockery; @@ -24,7 +25,7 @@ use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamFile; use Psr\Log\NullLogger; -class AutomaticInstallationConsoleTest extends ConsoleTest +class AutomaticInstallationConsoleTest extends ConsoleTestCase { use VFSTrait; use RendererMockTrait; @@ -273,7 +274,7 @@ Creating config file... Checking database... [Error] -------- -Could not connect to database.: +Could not connect to database.: FIN; @@ -633,12 +634,12 @@ Options -d|--dbdata The name of the mysql/mariadb database (env MYSQL_DATABASE) -U|--dbuser The username of the mysql/mariadb database login (env MYSQL_USER or MYSQL_USERNAME) -P|--dbpass The password of the mysql/mariadb database login (env MYSQL_PASSWORD) - -U|--url The full base URL of Friendica - f.e. 'https://friendica.local/sub' (env FRIENDICA_URL) + -U|--url The full base URL of Friendica - f.e. 'https://friendica.local/sub' (env FRIENDICA_URL) -B|--phppath The path of the PHP binary (env FRIENDICA_PHP_PATH) -b|--basepath The basepath of Friendica (env FRIENDICA_BASE_PATH) -t|--tz The timezone of Friendica (env FRIENDICA_TZ) -L|--lang The language of Friendica (env FRIENDICA_LANG) - + Environment variables MYSQL_HOST The host of the mysql/mariadb database (mandatory if mysql and environment is used) MYSQL_PORT The port of the mysql/mariadb database @@ -651,7 +652,7 @@ Environment variables FRIENDICA_ADMIN_MAIL The admin email address of Friendica (this email will be used for admin access) FRIENDICA_TZ The timezone of Friendica FRIENDICA_LANG The langauge of Friendica - + Examples bin/console autoinstall -f 'input.config.php Installs Friendica with the prepared 'input.config.php' file diff --git a/tests/src/Console/ConfigConsoleTest.php b/tests/src/Console/ConfigConsoleTest.php index efcfd1fb1f..3c983e04af 100644 --- a/tests/src/Console/ConfigConsoleTest.php +++ b/tests/src/Console/ConfigConsoleTest.php @@ -11,11 +11,12 @@ use Friendica\App; use Friendica\App\Mode; use Friendica\Console\Config; use Friendica\Core\Config\Capability\IManageConfigValues; +use Friendica\Test\ConsoleTestCase; use Mockery; use Mockery\LegacyMockInterface; use Mockery\MockInterface; -class ConfigConsoleTest extends ConsoleTest +class ConfigConsoleTest extends ConsoleTestCase { /** * @var App\Mode|MockInterface $appMode diff --git a/tests/src/Console/LockConsoleTest.php b/tests/src/Console/LockConsoleTest.php index 17fda1150b..d059de696f 100644 --- a/tests/src/Console/LockConsoleTest.php +++ b/tests/src/Console/LockConsoleTest.php @@ -11,10 +11,11 @@ use Friendica\App; use Friendica\App\Mode; use Friendica\Console\Lock; use Friendica\Core\Lock\Capability\ICanLock; +use Friendica\Test\ConsoleTestCase; use Mockery; use Mockery\MockInterface; -class LockConsoleTest extends ConsoleTest +class LockConsoleTest extends ConsoleTestCase { /** * @var App\Mode|MockInterface $appMode diff --git a/tests/src/Console/ServerBlockConsoleTest.php b/tests/src/Console/ServerBlockConsoleTest.php index 121e071e2a..cbbb8bdb39 100644 --- a/tests/src/Console/ServerBlockConsoleTest.php +++ b/tests/src/Console/ServerBlockConsoleTest.php @@ -9,10 +9,11 @@ namespace Friendica\Test\src\Console; use Friendica\Console\ServerBlock; use Friendica\Moderation\DomainPatternBlocklist; +use Friendica\Test\ConsoleTestCase; use Friendica\Test\FixtureTestTrait; use Mockery; -class ServerBlockConsoleTest extends ConsoleTest +class ServerBlockConsoleTest extends ConsoleTestCase { use FixtureTestTrait;