Skip to content

Commit

Permalink
feat: add setup transport
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Dec 3, 2024
1 parent fdeab1e commit 001a3d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/Services/InstallationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public function run(RunConfiguration $configuration, OutputInterface $output): v
$this->processHelper->console(['system:install', '--create-database', '--shop-locale=' . $shopLocale, '--shop-currency=' . $shopCurrency, '--force', ...$additionalInstallParameters]);
$this->processHelper->console(['user:create', $adminUser, '--password=' . $adminPassword]);

$this->processHelper->console(['messenger:setup-transports']);

if ($this->state->isStorefrontInstalled()) {
$this->removeExistingHeadlessSalesChannel();
if (!$this->state->isSalesChannelExisting($salesChannelUrl)) {
Expand Down
1 change: 1 addition & 0 deletions src/Services/UpgradeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function run(RunConfiguration $configuration, OutputInterface $output): v
$this->processHelper->console(['plugin:refresh']);
$this->processHelper->console(['theme:refresh']);
$this->processHelper->console(['scheduled-task:register']);
$this->processHelper->console(['messenger:setup-transports']);

$this->pluginHelper->installPlugins($configuration->skipAssetsInstall);
$this->pluginHelper->updatePlugins($configuration->skipAssetsInstall);
Expand Down
2 changes: 1 addition & 1 deletion tests/Services/InstallationManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testRunDisabledAssetCopyAndThemeCompile(): void

$manager->run(new RunConfiguration(true, true), $this->createMock(OutputInterface::class));

static::assertCount(6, $consoleCommands);
static::assertCount(7, $consoleCommands);
static::assertSame(['system:install', '--create-database', '--shop-locale=en-GB', '--shop-currency=EUR', '--force', '--no-assign-theme', '--skip-assets-install'], $consoleCommands[0]);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Services/UpgradeManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function testRunUpdatesVersionNoAssetCompile(): void

$manager->run(new RunConfiguration(true, true), $this->createMock(OutputInterface::class));

static::assertCount(4, $consoleCommands);
static::assertCount(5, $consoleCommands);
static::assertSame(['system:update:finish', '--skip-asset-build'], $consoleCommands[0]);
}

Expand Down Expand Up @@ -165,7 +165,7 @@ public function testRunWithDifferentSalesChannelUrl(): void

$manager->run(new RunConfiguration(), $this->createMock(OutputInterface::class));

static::assertCount(5, $consoleCommands);
static::assertCount(6, $consoleCommands);
static::assertSame(['sales-channel:create:storefront', '--name=Storefront', '--url=http://foo.com'], $consoleCommands[0]);
}

Expand Down Expand Up @@ -206,10 +206,10 @@ public function testRunWithMaintenanceMode(): void

$manager->run(new RunConfiguration(), $this->createMock(OutputInterface::class));

static::assertCount(6, $consoleCommands);
static::assertCount(7, $consoleCommands);
static::assertSame(['cache:pool:clear', 'cache.http', 'cache.object'], $consoleCommands[0]);
static::assertArrayHasKey(5, $consoleCommands);
static::assertSame(['cache:pool:clear', 'cache.http', 'cache.object'], $consoleCommands[5]);
static::assertSame(['cache:pool:clear', 'cache.http', 'cache.object'], $consoleCommands[6]);
}

public function testRunWithLicenseDomain(): void
Expand Down

0 comments on commit 001a3d7

Please sign in to comment.