shouldReceive('checkUpdates') ->once() ->with(null) ->andReturn(['checked' => 0, 'updates' => 0, 'details' => []]); $this->app->instance(LanguagePackService::class, $service); $this->artisan('language-pack:check-updates') ->expectsOutputToContain('GitHub 기반 언어팩이 없습니다') ->assertSuccessful(); } public function test_renders_each_detail_line(): void { $service = Mockery::mock(LanguagePackService::class); $service->shouldReceive('checkUpdates') ->once() ->with(null) ->andReturn([ 'checked' => 2, 'updates' => 1, 'details' => [ ['identifier' => 'foo-core-ja', 'current' => '1.0.0', 'latest' => '1.1.0', 'has_update' => true, 'error' => null], ['identifier' => 'foo-core-de', 'current' => '1.0.0', 'latest' => '1.0.0', 'has_update' => false, 'error' => null], ], ]); $this->app->instance(LanguagePackService::class, $service); $this->artisan('language-pack:check-updates') ->expectsOutputToContain('foo-core-ja') ->expectsOutputToContain('foo-core-de') ->assertSuccessful(); } public function test_passes_identifier_option(): void { $service = Mockery::mock(LanguagePackService::class); $service->shouldReceive('checkUpdates') ->once() ->with('foo-core-ja') ->andReturn(['checked' => 0, 'updates' => 0, 'details' => []]); $this->app->instance(LanguagePackService::class, $service); $this->artisan('language-pack:check-updates', ['--identifier' => 'foo-core-ja']) ->assertSuccessful(); } }