diff --git a/packages/core/src/Commands/InstallCommand.php b/packages/core/src/Commands/InstallCommand.php index 1d3a19738..bf7eaf399 100644 --- a/packages/core/src/Commands/InstallCommand.php +++ b/packages/core/src/Commands/InstallCommand.php @@ -25,13 +25,8 @@ public function __construct( private Container $container, ) {} - #[ConsoleCommand( - name: 'install', - description: 'Applies the specified installer', - middleware: [ForceMiddleware::class], - allowDynamicArguments: true, - )] - public function __invoke(?string $installer = null, bool $_tailwind = false): void + #[ConsoleCommand(name: 'install', description: 'Applies the specified installer', middleware: [ForceMiddleware::class], allowDynamicArguments: true)] + public function __invoke(?string $installer = null): void { $installer = $this->resolveInstaller($installer); @@ -41,12 +36,6 @@ public function __invoke(?string $installer = null, bool $_tailwind = false): vo return; } - if (! $this->confirm("Running the {$installer->name} installer, continue?", default: true)) { - $this->error('Aborted.'); - - return; - } - $installer->install(); } diff --git a/tests/Integration/Core/FrameworkInstallerTest.php b/tests/Integration/Core/FrameworkInstallerTest.php index 5a15f28d8..1e0780e20 100644 --- a/tests/Integration/Core/FrameworkInstallerTest.php +++ b/tests/Integration/Core/FrameworkInstallerTest.php @@ -31,13 +31,6 @@ protected function tearDown(): void parent::tearDown(); } - public function test_it_asks_to_continue_installing(): void - { - $this->console - ->call('install framework') - ->assertSee('Running the framework installer, continue?'); - } - public function test_it_can_force_install(): void { $this->console diff --git a/tests/Integration/Core/InstallCommandTest.php b/tests/Integration/Core/InstallCommandTest.php index f6622a270..55d8b5953 100644 --- a/tests/Integration/Core/InstallCommandTest.php +++ b/tests/Integration/Core/InstallCommandTest.php @@ -4,6 +4,9 @@ namespace Tests\Tempest\Integration\Core; +use PHPUnit\Framework\Attributes\PostCondition; +use PHPUnit\Framework\Attributes\PreCondition; +use PHPUnit\Framework\Attributes\Test; use Tempest\Support\Namespace\Psr4Namespace; use Tests\Tempest\Integration\FrameworkIntegrationTestCase; @@ -12,29 +15,24 @@ */ final class InstallCommandTest extends FrameworkIntegrationTestCase { - protected function setUp(): void + #[PreCondition] + protected function configure(): void { - parent::setUp(); - $this->installer - ->configure( - $this->internalStorage . '/install', - new Psr4Namespace('App\\', $this->internalStorage . '/install/App'), - ) + ->configure($this->internalStorage . '/install', new Psr4Namespace('App\\', $this->internalStorage . '/install/App')) ->setRoot($this->internalStorage . '/install'); } - protected function tearDown(): void + #[PostCondition] + protected function cleanup(): void { $this->installer->clean(); - - parent::tearDown(); } - public function test_class_is_adjusted(): void + #[Test] + public function class_is_adjusted(): void { - $this->console - ->call('install test --force'); + $this->console->call('install test --force'); $this->installer ->assertFileExists(