v7.0.0 release

This commit is contained in:
HeuJung committed 2026-07-01 10:30:32 +09:00
1 parent 0e7fa04b03
commit c4ea9a6cd1
3582 files changed
+626189 -160151

No files matched your search

@@ -7,6 +7,7 @@ use App\Extension\ModuleManager;
use App\Extension\PluginManager;
use App\Extension\TemplateManager;
use App\Services\CoreUpdateService;
use App\Services\LanguagePackService;
use Mockery;
use Tests\TestCase;
@@ -23,7 +24,7 @@ class BundledExtensionUpdatePromptTest extends TestCase
*/
public function test_collect_bundled_updates_delegates_to_service(): void
{
$expected = [
$serviceResult = [
'modules' => [
['identifier' => 'sirsoft-ecommerce', 'current_version' => '1.0.0', 'latest_version' => '1.1.0', 'update_source' => 'bundled'],
],
@@ -32,13 +33,22 @@ class BundledExtensionUpdatePromptTest extends TestCase
],
'templates' => [],
];
$langPackResult = [
['identifier' => 'g7-core-ja', 'current_version' => '1.0.0', 'latest_version' => '1.0.1', 'update_source' => 'bundled'],
];
$serviceMock = Mockery::mock(CoreUpdateService::class);
$serviceMock->shouldReceive('collectBundledExtensionUpdates')
->once()
->andReturn($expected);
->andReturn($serviceResult);
$this->app->instance(CoreUpdateService::class, $serviceMock);
$langPackMock = Mockery::mock(LanguagePackService::class);
$langPackMock->shouldReceive('collectBundledLangPackUpdates')
->once()
->andReturn($langPackResult);
$this->app->instance(LanguagePackService::class, $langPackMock);
$harness = $this->makeTraitHarness();
$result = $harness->callCollect(
Mockery::mock(ModuleManager::class),
@@ -46,6 +56,8 @@ class BundledExtensionUpdatePromptTest extends TestCase
Mockery::mock(TemplateManager::class),
);
// trait 은 CoreUpdateService 결과에 LanguagePackService 의 lang_packs 를 덧붙인다.
$expected = $serviceResult + ['lang_packs' => $langPackResult];
$this->assertSame($expected, $result);
}
@@ -60,6 +72,12 @@ class BundledExtensionUpdatePromptTest extends TestCase
->andReturn(['modules' => [], 'plugins' => [], 'templates' => []]);
$this->app->instance(CoreUpdateService::class, $serviceMock);
$langPackMock = Mockery::mock(LanguagePackService::class);
$langPackMock->shouldReceive('collectBundledLangPackUpdates')
->once()
->andReturn([]);
$this->app->instance(LanguagePackService::class, $langPackMock);
$harness = $this->makeTraitHarness();
$result = $harness->callCollect(
Mockery::mock(ModuleManager::class),
@@ -70,6 +88,7 @@ class BundledExtensionUpdatePromptTest extends TestCase
$this->assertEmpty($result['modules']);
$this->assertEmpty($result['plugins']);
$this->assertEmpty($result['templates']);
$this->assertEmpty($result['lang_packs']);
}
/**