Skip to content

Commit

Permalink
Merge pull request #34 from shopware/fix-theme-refresh-call
Browse files Browse the repository at this point in the history
fix: theme refresh call, fixes #33
  • Loading branch information
shyim authored Dec 11, 2024
2 parents 0866ce6 + 4219da8 commit 9cdcb79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/Services/UpgradeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public function run(RunConfiguration $configuration, OutputInterface $output): v
}

$this->processHelper->console(['plugin:refresh']);
$this->processHelper->console(['theme:refresh']);

if ($this->state->isStorefrontInstalled()) {
$this->processHelper->console(['theme:refresh']);
}

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

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(5, $consoleCommands);
static::assertCount(4, $consoleCommands);
static::assertSame(['system:update:finish', '--skip-asset-build'], $consoleCommands[0]);
}

Expand All @@ -133,7 +133,7 @@ public function testRunWithDifferentSalesChannelUrl(): void
{
$state = $this->createMock(ShopwareState::class);
$state
->expects($this->once())
->expects($this->exactly(2))
->method('isStorefrontInstalled')
->willReturn(true);

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

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

static::assertCount(7, $consoleCommands);
static::assertCount(6, $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[6]);
static::assertSame(['cache:pool:clear', 'cache.http', 'cache.object'], $consoleCommands[5]);
}

public function testRunWithLicenseDomain(): void
Expand Down

0 comments on commit 9cdcb79

Please sign in to comment.