20 lines
588 B
PHP
20 lines
588 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Services\LeaderboardService;
|
|
|
|
it('refreshes all leaderboards from the command entrypoint', function (): void {
|
|
$leaderboards = $this->mock(LeaderboardService::class);
|
|
$leaderboards->shouldReceive('refreshAll')
|
|
->once()
|
|
->andReturn([
|
|
'creator' => ['daily' => 3],
|
|
'artwork' => ['daily' => 5],
|
|
]);
|
|
|
|
$this->artisan('leaderboards:refresh')
|
|
->expectsOutput('Refreshing leaderboards …')
|
|
->expectsOutput('Done. Updated: 8 leaderboard row(s).')
|
|
->assertSuccessful();
|
|
}); |