From 867e8d69635d96c2e2b33e070cbc14d4e5387659 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sun, 9 Jan 2022 11:21:37 +0900 Subject: [PATCH 1/4] fix: add missing Migration lang item --- system/Commands/Database/Migrate.php | 2 +- system/Language/en/Migrations.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/Commands/Database/Migrate.php b/system/Commands/Database/Migrate.php index 91a699b346d6..fb8de810cded 100644 --- a/system/Commands/Database/Migrate.php +++ b/system/Commands/Database/Migrate.php @@ -91,7 +91,7 @@ public function run(array $params) CLI::write($message); } - CLI::write('Done migrations.', 'green'); + CLI::write(lang('Migrations.done'), 'green'); // @codeCoverageIgnoreStart } catch (Throwable $e) { diff --git a/system/Language/en/Migrations.php b/system/Language/en/Migrations.php index 1e9ef6316d37..df0aeed93dcf 100644 --- a/system/Language/en/Migrations.php +++ b/system/Language/en/Migrations.php @@ -36,6 +36,7 @@ 'latest' => 'Running all new migrations...', 'generalFault' => 'Migration failed!', + 'done' => 'Done migrations.', 'migInvalidVersion' => 'Invalid version number provided.', 'toVersionPH' => 'Migrating to version %s...', 'toVersion' => 'Migrating to current version...', From ceff4d71844873e2b4ba5969e88f811254e7f014 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 10 Jan 2022 08:37:30 +0900 Subject: [PATCH 2/4] refactor: fix lang key Co-authored-by: MGatner --- system/Commands/Database/Migrate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Commands/Database/Migrate.php b/system/Commands/Database/Migrate.php index fb8de810cded..bcf71cade337 100644 --- a/system/Commands/Database/Migrate.php +++ b/system/Commands/Database/Migrate.php @@ -91,7 +91,7 @@ public function run(array $params) CLI::write($message); } - CLI::write(lang('Migrations.done'), 'green'); + CLI::write(lang('Migrations.migrated'), 'green'); // @codeCoverageIgnoreStart } catch (Throwable $e) { From 41c8b17854e8d05fcb7fe6008117a7ec611a6c79 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 10 Jan 2022 08:37:44 +0900 Subject: [PATCH 3/4] refactor: fix lang key Co-authored-by: MGatner --- system/Language/en/Migrations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Language/en/Migrations.php b/system/Language/en/Migrations.php index df0aeed93dcf..9bfb5c60ae25 100644 --- a/system/Language/en/Migrations.php +++ b/system/Language/en/Migrations.php @@ -36,7 +36,7 @@ 'latest' => 'Running all new migrations...', 'generalFault' => 'Migration failed!', - 'done' => 'Done migrations.', + 'migrated' => 'Migrations complete.', 'migInvalidVersion' => 'Invalid version number provided.', 'toVersionPH' => 'Migrating to version %s...', 'toVersion' => 'Migrating to current version...', From 1abcac39979d21524ab90f516b2efc8f1cb89b49 Mon Sep 17 00:00:00 2001 From: kenjis Date: Mon, 10 Jan 2022 10:23:13 +0900 Subject: [PATCH 4/4] test: update migration message --- tests/system/Commands/DatabaseCommandsTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/Commands/DatabaseCommandsTest.php b/tests/system/Commands/DatabaseCommandsTest.php index 0d33342654f0..51221142f9b1 100644 --- a/tests/system/Commands/DatabaseCommandsTest.php +++ b/tests/system/Commands/DatabaseCommandsTest.php @@ -52,12 +52,12 @@ protected function clearBuffer(): void public function testMigrate() { command('migrate --all'); - $this->assertStringContainsString('Done migrations.', $this->getBuffer()); + $this->assertStringContainsString('Migrations complete.', $this->getBuffer()); command('migrate:rollback'); $this->clearBuffer(); command('migrate -n Tests\\\\Support'); - $this->assertStringContainsString('Done migrations.', $this->getBuffer()); + $this->assertStringContainsString('Migrations complete.', $this->getBuffer()); } public function testMigrateRollback() @@ -75,7 +75,7 @@ public function testMigrateRefresh() $this->clearBuffer(); command('migrate:refresh'); - $this->assertStringContainsString('Done migrations.', $this->getBuffer()); + $this->assertStringContainsString('Migrations complete.', $this->getBuffer()); } public function testMigrateStatus()