Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions packages/core/src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -41,12 +36,6 @@ public function __invoke(?string $installer = null, bool $_tailwind = false): vo
return;
}

if (! $this->confirm("Running the <em>{$installer->name}</em> installer, continue?", default: true)) {
$this->error('Aborted.');

return;
}

$installer->install();
}

Expand Down
7 changes: 0 additions & 7 deletions tests/Integration/Core/FrameworkInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 11 additions & 13 deletions tests/Integration/Core/InstallCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(
Expand Down
Loading