- /** @var UserAvatars $avatar */
- $avatar = app()->make(UserAvatars::class);
-
- /** @var Collection|User[] $users */
- $users = User::query()->get();
- foreach ($users as $user) {
- $avatar->destroyAllForUser($user);
- }
-
- $this->artisan(RefreshAvatarCommand::class, ['--all' => true, '-f' => true])
- ->expectsQuestion('Are you sure you want to refresh avatars for ALL USERS?', false)
- ->assertExitCode(Command::SUCCESS);
+ $this->artisan('bookstack:refresh-avatar --all -f')
+ ->expectsQuestion('Are you sure you want to proceed?', false)
+ ->assertExitCode(0);