From cd1b69995cc46e56491b8207fa99e33468c9c321 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sun, 29 Oct 2023 16:28:53 +0100 Subject: [PATCH] feat: add monica:getversion command (#6965) --- app/Console/Commands/GetVersion.php | 30 ++++++++++++++++++++++++++ tests/Unit/Commands/GetVersionTest.php | 18 ++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 app/Console/Commands/GetVersion.php create mode 100644 tests/Unit/Commands/GetVersionTest.php diff --git a/app/Console/Commands/GetVersion.php b/app/Console/Commands/GetVersion.php new file mode 100644 index 00000000000..9fecfdb3ecd --- /dev/null +++ b/app/Console/Commands/GetVersion.php @@ -0,0 +1,30 @@ +line(config('monica.app_version')); + } +} diff --git a/tests/Unit/Commands/GetVersionTest.php b/tests/Unit/Commands/GetVersionTest.php new file mode 100644 index 00000000000..0cdb7c894a3 --- /dev/null +++ b/tests/Unit/Commands/GetVersionTest.php @@ -0,0 +1,18 @@ + '1.0.0']); + + $this->artisan('monica:getversion') + ->expectsOutput('1.0.0') + ->assertExitCode(0); + } +}