From e549c16f97a87d4969826c88b1428bd57e6651d6 Mon Sep 17 00:00:00 2001 From: Brent Roose Date: Thu, 30 May 2024 13:58:32 +0200 Subject: [PATCH] Cleanup --- tests/Actions/CompleteConsoleCommandArgumentsTest.php | 4 ++-- tests/Actions/ExecuteConsoleCommandTest.php | 4 ++-- tests/Commands/CompleteCommandTest.php | 4 ++-- tests/Commands/RunTaskCommandTest.php | 4 ++-- tests/Components/QuestionComponentTest.php | 4 ++-- tests/Components/SearchComponentTest.php | 4 ++-- tests/Components/Static/StaticConfirmComponentTest.php | 4 ++-- tests/Components/Static/StaticMultipleChoiceComponentTest.php | 4 ++-- tests/Components/Static/StaticProgressBarComponentTest.php | 4 ++-- tests/Components/Static/StaticSearchComponentTest.php | 4 ++-- tests/Components/Static/StaticSingleChoiceComponentTest.php | 4 ++-- tests/Components/Static/StaticTextBoxComponentTest.php | 4 ++-- tests/Components/TextBoxComponentTest.php | 4 ++-- tests/ConsoleArgumentBagTest.php | 2 +- tests/{TestCase.php => ConsoleIntegrationTestCase.php} | 3 ++- tests/Exceptions/CommandNotFoundExceptionTest.php | 4 ++-- tests/Exceptions/ConsoleExceptionHandlerTest.php | 4 ++-- tests/Fixtures/CommandAliasesWork.php | 4 ++-- tests/Middleware/CautionMiddlewareTest.php | 4 ++-- tests/Middleware/ForceMiddlewareTest.php | 4 ++-- tests/Middleware/InvalidCommandMiddlewareTest.php | 4 ++-- tests/Middleware/OverviewMiddlewareTest.php | 4 ++-- tests/RenderConsoleCommandTest.php | 2 +- tests/Scheduler/GenericSchedulerTest.php | 4 ++-- tests/Scheduler/IntervalTest.php | 4 ++-- tests/Scheduler/SchedulerInvokeCommandTest.php | 4 ++-- tests/Terminal/TerminalTest.php | 4 ++-- tests/Testing/ConsoleTesterTest.php | 4 ++-- 28 files changed, 54 insertions(+), 53 deletions(-) rename tests/{TestCase.php => ConsoleIntegrationTestCase.php} (94%) diff --git a/tests/Actions/CompleteConsoleCommandArgumentsTest.php b/tests/Actions/CompleteConsoleCommandArgumentsTest.php index 0c12f90..d7e9049 100644 --- a/tests/Actions/CompleteConsoleCommandArgumentsTest.php +++ b/tests/Actions/CompleteConsoleCommandArgumentsTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Actions; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class CompleteConsoleCommandArgumentsTest extends TestCase +class CompleteConsoleCommandArgumentsTest extends ConsoleIntegrationTestCase { public function test_arguments_are_printed(): void { diff --git a/tests/Actions/ExecuteConsoleCommandTest.php b/tests/Actions/ExecuteConsoleCommandTest.php index fcf17b6..161b343 100644 --- a/tests/Actions/ExecuteConsoleCommandTest.php +++ b/tests/Actions/ExecuteConsoleCommandTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Actions; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class ExecuteConsoleCommandTest extends TestCase +class ExecuteConsoleCommandTest extends ConsoleIntegrationTestCase { public function test_command_specific_middleware(): void { diff --git a/tests/Commands/CompleteCommandTest.php b/tests/Commands/CompleteCommandTest.php index 808abca..e249b29 100644 --- a/tests/Commands/CompleteCommandTest.php +++ b/tests/Commands/CompleteCommandTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Commands; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class CompleteCommandTest extends TestCase +class CompleteCommandTest extends ConsoleIntegrationTestCase { public function test_complete_commands(): void { diff --git a/tests/Commands/RunTaskCommandTest.php b/tests/Commands/RunTaskCommandTest.php index 36efe43..5dbaac6 100644 --- a/tests/Commands/RunTaskCommandTest.php +++ b/tests/Commands/RunTaskCommandTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Commands; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class RunTaskCommandTest extends TestCase +class RunTaskCommandTest extends ConsoleIntegrationTestCase { public function test_run_task() { diff --git a/tests/Components/QuestionComponentTest.php b/tests/Components/QuestionComponentTest.php index 5a5affd..02cd38c 100644 --- a/tests/Components/QuestionComponentTest.php +++ b/tests/Components/QuestionComponentTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Components; use Tempest\Console\Components\Interactive\SingleChoiceComponent; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class QuestionComponentTest extends TestCase +class QuestionComponentTest extends ConsoleIntegrationTestCase { public function test_question_component(): void { diff --git a/tests/Components/SearchComponentTest.php b/tests/Components/SearchComponentTest.php index 72bfedc..c63eaa3 100644 --- a/tests/Components/SearchComponentTest.php +++ b/tests/Components/SearchComponentTest.php @@ -7,13 +7,13 @@ use Tempest\Console\Components\Interactive\SearchComponent; use Tempest\Console\Key; use Tempest\Console\Point; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class SearchComponentTest extends TestCase +class SearchComponentTest extends ConsoleIntegrationTestCase { public function test_search_component(): void { diff --git a/tests/Components/Static/StaticConfirmComponentTest.php b/tests/Components/Static/StaticConfirmComponentTest.php index bc62031..d936278 100644 --- a/tests/Components/Static/StaticConfirmComponentTest.php +++ b/tests/Components/Static/StaticConfirmComponentTest.php @@ -6,13 +6,13 @@ use Tempest\Console\Console; use Tempest\Console\Key; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticConfirmComponentTest extends TestCase +class StaticConfirmComponentTest extends ConsoleIntegrationTestCase { public function test_confirm(): void { diff --git a/tests/Components/Static/StaticMultipleChoiceComponentTest.php b/tests/Components/Static/StaticMultipleChoiceComponentTest.php index 68cd015..7c9a5ef 100644 --- a/tests/Components/Static/StaticMultipleChoiceComponentTest.php +++ b/tests/Components/Static/StaticMultipleChoiceComponentTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Components\Static; use Tempest\Console\Console; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticMultipleChoiceComponentTest extends TestCase +class StaticMultipleChoiceComponentTest extends ConsoleIntegrationTestCase { public function test_ask(): void { diff --git a/tests/Components/Static/StaticProgressBarComponentTest.php b/tests/Components/Static/StaticProgressBarComponentTest.php index 534e24d..de484cb 100644 --- a/tests/Components/Static/StaticProgressBarComponentTest.php +++ b/tests/Components/Static/StaticProgressBarComponentTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Components\Static; use Tempest\Console\Console; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticProgressBarComponentTest extends TestCase +class StaticProgressBarComponentTest extends ConsoleIntegrationTestCase { public function test_progress_bar(): void { diff --git a/tests/Components/Static/StaticSearchComponentTest.php b/tests/Components/Static/StaticSearchComponentTest.php index fc56c0d..488b7cc 100644 --- a/tests/Components/Static/StaticSearchComponentTest.php +++ b/tests/Components/Static/StaticSearchComponentTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Components\Static; use Tempest\Console\Console; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticSearchComponentTest extends TestCase +class StaticSearchComponentTest extends ConsoleIntegrationTestCase { public function test_search_component(): void { diff --git a/tests/Components/Static/StaticSingleChoiceComponentTest.php b/tests/Components/Static/StaticSingleChoiceComponentTest.php index 92abc87..9ed8016 100644 --- a/tests/Components/Static/StaticSingleChoiceComponentTest.php +++ b/tests/Components/Static/StaticSingleChoiceComponentTest.php @@ -6,13 +6,13 @@ use Tempest\Console\Console; use Tempest\Console\Key; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticSingleChoiceComponentTest extends TestCase +class StaticSingleChoiceComponentTest extends ConsoleIntegrationTestCase { public function test_with_options(): void { diff --git a/tests/Components/Static/StaticTextBoxComponentTest.php b/tests/Components/Static/StaticTextBoxComponentTest.php index d02646e..a18d10c 100644 --- a/tests/Components/Static/StaticTextBoxComponentTest.php +++ b/tests/Components/Static/StaticTextBoxComponentTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Components\Static; use Tempest\Console\Console; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class StaticTextBoxComponentTest extends TestCase +class StaticTextBoxComponentTest extends ConsoleIntegrationTestCase { public function test_text_box(): void { diff --git a/tests/Components/TextBoxComponentTest.php b/tests/Components/TextBoxComponentTest.php index de51254..806c5d1 100644 --- a/tests/Components/TextBoxComponentTest.php +++ b/tests/Components/TextBoxComponentTest.php @@ -6,13 +6,13 @@ use Tempest\Console\Components\Interactive\TextBoxComponent; use Tempest\Console\Point; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class TextBoxComponentTest extends TestCase +class TextBoxComponentTest extends ConsoleIntegrationTestCase { public function test_text_question_component(): void { diff --git a/tests/ConsoleArgumentBagTest.php b/tests/ConsoleArgumentBagTest.php index 1b41eea..0f101f7 100644 --- a/tests/ConsoleArgumentBagTest.php +++ b/tests/ConsoleArgumentBagTest.php @@ -11,7 +11,7 @@ * @internal * @small */ -final class ConsoleArgumentBagTest extends TestCase +final class ConsoleArgumentBagTest extends ConsoleIntegrationTestCase { public function test_argument_bag_works(): void { diff --git a/tests/TestCase.php b/tests/ConsoleIntegrationTestCase.php similarity index 94% rename from tests/TestCase.php rename to tests/ConsoleIntegrationTestCase.php index 9228b0c..873bc4a 100644 --- a/tests/TestCase.php +++ b/tests/ConsoleIntegrationTestCase.php @@ -4,6 +4,7 @@ namespace Tests\Tempest\Console; +use PHPUnit\Framework\TestCase; use Tempest\AppConfig; use Tempest\Application; use Tempest\Console\ConsoleApplication; @@ -19,7 +20,7 @@ * @internal * @small */ -class TestCase extends \PHPUnit\Framework\TestCase +class ConsoleIntegrationTestCase extends TestCase { protected Container $container; protected ConsoleTester $console; diff --git a/tests/Exceptions/CommandNotFoundExceptionTest.php b/tests/Exceptions/CommandNotFoundExceptionTest.php index bbf5054..e904653 100644 --- a/tests/Exceptions/CommandNotFoundExceptionTest.php +++ b/tests/Exceptions/CommandNotFoundExceptionTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Exceptions; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class CommandNotFoundExceptionTest extends TestCase +class CommandNotFoundExceptionTest extends ConsoleIntegrationTestCase { public function test_console_exception_handler(): void { diff --git a/tests/Exceptions/ConsoleExceptionHandlerTest.php b/tests/Exceptions/ConsoleExceptionHandlerTest.php index 90c14ee..2158cd6 100644 --- a/tests/Exceptions/ConsoleExceptionHandlerTest.php +++ b/tests/Exceptions/ConsoleExceptionHandlerTest.php @@ -12,13 +12,13 @@ use Tempest\Console\Input\UnsupportedInputBuffer; use Tempest\Console\Output\MemoryOutputBuffer; use Tempest\Highlight\Highlighter; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class ConsoleExceptionHandlerTest extends TestCase +class ConsoleExceptionHandlerTest extends ConsoleIntegrationTestCase { public function test_render_console_exception(): void { diff --git a/tests/Fixtures/CommandAliasesWork.php b/tests/Fixtures/CommandAliasesWork.php index d01f0a2..44b092d 100644 --- a/tests/Fixtures/CommandAliasesWork.php +++ b/tests/Fixtures/CommandAliasesWork.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Fixtures; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -final class CommandAliasesWork extends TestCase +final class CommandAliasesWork extends ConsoleIntegrationTestCase { public function test_aliases_work() { diff --git a/tests/Middleware/CautionMiddlewareTest.php b/tests/Middleware/CautionMiddlewareTest.php index af0d5a7..f1fbec0 100644 --- a/tests/Middleware/CautionMiddlewareTest.php +++ b/tests/Middleware/CautionMiddlewareTest.php @@ -6,13 +6,13 @@ use Tempest\AppConfig; use Tempest\Environment; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class CautionMiddlewareTest extends TestCase +class CautionMiddlewareTest extends ConsoleIntegrationTestCase { public function test_in_local(): void { diff --git a/tests/Middleware/ForceMiddlewareTest.php b/tests/Middleware/ForceMiddlewareTest.php index 2d130e0..dac2eef 100644 --- a/tests/Middleware/ForceMiddlewareTest.php +++ b/tests/Middleware/ForceMiddlewareTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Middleware; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class ForceMiddlewareTest extends TestCase +class ForceMiddlewareTest extends ConsoleIntegrationTestCase { public function test_force(): void { diff --git a/tests/Middleware/InvalidCommandMiddlewareTest.php b/tests/Middleware/InvalidCommandMiddlewareTest.php index 65caedb..c0d16f4 100644 --- a/tests/Middleware/InvalidCommandMiddlewareTest.php +++ b/tests/Middleware/InvalidCommandMiddlewareTest.php @@ -4,14 +4,14 @@ namespace Tests\Tempest\Console\Middleware; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; use Tests\Tempest\Console\Fixtures\ComplexCommand; -use Tests\Tempest\Console\TestCase; /** * @internal * @small */ -class InvalidCommandMiddlewareTest extends TestCase +class InvalidCommandMiddlewareTest extends ConsoleIntegrationTestCase { public function test_provide_missing_input(): void { diff --git a/tests/Middleware/OverviewMiddlewareTest.php b/tests/Middleware/OverviewMiddlewareTest.php index 4f500fc..d6e9e11 100644 --- a/tests/Middleware/OverviewMiddlewareTest.php +++ b/tests/Middleware/OverviewMiddlewareTest.php @@ -4,13 +4,13 @@ namespace Tests\Tempest\Console\Middleware; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class OverviewMiddlewareTest extends TestCase +class OverviewMiddlewareTest extends ConsoleIntegrationTestCase { public function test_overview(): void { diff --git a/tests/RenderConsoleCommandTest.php b/tests/RenderConsoleCommandTest.php index 9243e51..00ed390 100644 --- a/tests/RenderConsoleCommandTest.php +++ b/tests/RenderConsoleCommandTest.php @@ -18,7 +18,7 @@ * @internal * @small */ -class RenderConsoleCommandTest extends TestCase +class RenderConsoleCommandTest extends ConsoleIntegrationTestCase { public function test_render() { diff --git a/tests/Scheduler/GenericSchedulerTest.php b/tests/Scheduler/GenericSchedulerTest.php index dad8a5d..085aadb 100644 --- a/tests/Scheduler/GenericSchedulerTest.php +++ b/tests/Scheduler/GenericSchedulerTest.php @@ -12,13 +12,13 @@ use Tempest\Console\Scheduler\GenericScheduler; use Tempest\Console\Scheduler\NullShellExecutor; use Tempest\Console\Scheduler\SchedulerConfig; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -final class GenericSchedulerTest extends TestCase +final class GenericSchedulerTest extends ConsoleIntegrationTestCase { protected function setUp(): void { diff --git a/tests/Scheduler/IntervalTest.php b/tests/Scheduler/IntervalTest.php index a3027df..06b510e 100644 --- a/tests/Scheduler/IntervalTest.php +++ b/tests/Scheduler/IntervalTest.php @@ -5,13 +5,13 @@ namespace Tests\Tempest\Console\Scheduler; use Tempest\Console\Scheduler\Interval; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -final class IntervalTest extends TestCase +final class IntervalTest extends ConsoleIntegrationTestCase { public function test_interval_with_seconds_returns_correct_in_seconds() { diff --git a/tests/Scheduler/SchedulerInvokeCommandTest.php b/tests/Scheduler/SchedulerInvokeCommandTest.php index 2042219..6880ba6 100644 --- a/tests/Scheduler/SchedulerInvokeCommandTest.php +++ b/tests/Scheduler/SchedulerInvokeCommandTest.php @@ -5,14 +5,14 @@ namespace Tests\Tempest\Console\Scheduler; use Tempest\Console\Commands\ScheduleTaskCommand; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; use Tests\Tempest\Console\Fixtures\ScheduledCommand; -use Tests\Tempest\Console\TestCase; /** * @internal * @small */ -final class SchedulerInvokeCommandTest extends TestCase +final class SchedulerInvokeCommandTest extends ConsoleIntegrationTestCase { public function test_scheduler_invoke_command_executes_handler() { diff --git a/tests/Terminal/TerminalTest.php b/tests/Terminal/TerminalTest.php index 73e6dc1..5be317e 100644 --- a/tests/Terminal/TerminalTest.php +++ b/tests/Terminal/TerminalTest.php @@ -6,13 +6,13 @@ use Tempest\Console\Console; use Tempest\Console\Key; -use Tests\Tempest\Console\TestCase; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; /** * @internal * @small */ -class TerminalTest extends TestCase +class TerminalTest extends ConsoleIntegrationTestCase { public function test_terminal_rendering(): void { diff --git a/tests/Testing/ConsoleTesterTest.php b/tests/Testing/ConsoleTesterTest.php index 5c8221d..afbd09f 100644 --- a/tests/Testing/ConsoleTesterTest.php +++ b/tests/Testing/ConsoleTesterTest.php @@ -6,16 +6,16 @@ use Tempest\Console\Console; use Tempest\Console\ExitCode; +use Tests\Tempest\Console\ConsoleIntegrationTestCase; use Tests\Tempest\Console\Fixtures\ComplexCommand; use Tests\Tempest\Console\Fixtures\Hello; use Tests\Tempest\Console\Fixtures\InteractiveCommand; -use Tests\Tempest\Console\TestCase; /** * @internal * @small */ -class ConsoleTesterTest extends TestCase +class ConsoleTesterTest extends ConsoleIntegrationTestCase { public function test_call_with_invokable(): void {