Skip to content

Commit

Permalink
fix(config): Update music-dl config key to app
Browse files Browse the repository at this point in the history
- Updated the config key 'music-dl.sources' to 'app.sources' in multiple files
- Replaced usage of 'config' helper with '__' function for localization
  • Loading branch information
guanguans committed Apr 24, 2024
1 parent fc4a1cb commit 9bd6a19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/Feature/MusicCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
'--dir' => downloads_path(),
'--driver' => 'sequence',
'--no-continue' => true,
'--sources' => config('music-dl.sources'),
'--sources' => config('app.sources'),
])
->expectsConfirmation(config('music-dl.confirm_label'), 'yes')
// ->expectsQuestion(config('music-dl.select_label'), [config('music-dl.all_songs')])
->expectsConfirmation(__('confirm_label'), 'yes')
// ->expectsQuestion(__('select_label'), [__('all_songs')])
->expectsChoice(
config('music-dl.select_label'),
[config('music-dl.all_songs')],
__('select_label'),
[__('all_songs')],
$this->hydrates(collect($songs), $keyword)->all()
)
->assertSuccessful();
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Music/ForkMusicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
use Illuminate\Support\Collection;

it('can search songs', function (): void {
expect(app(ForkMusic::class))->search('腰乐队', config('music-dl.sources'))->toBeInstanceOf(Collection::class);
expect(app(ForkMusic::class))->search('腰乐队', config('app.sources'))->toBeInstanceOf(Collection::class);
})->group(__DIR__, __FILE__)->skipOnWindows();
2 changes: 1 addition & 1 deletion tests/Unit/Music/SequenceMusicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Illuminate\Support\Collection;

it('can search songs', function (): void {
expect(app(SequenceMusic::class))->search('腰乐队', config('music-dl.sources'))->toBeInstanceOf(Collection::class);
expect(app(SequenceMusic::class))->search('腰乐队', config('app.sources'))->toBeInstanceOf(Collection::class);
})->group(__DIR__, __FILE__);

it('will throw exception when download failed', function (): void {
Expand Down

0 comments on commit 9bd6a19

Please sign in to comment.