diff --git a/app/Form/Actions/ExportSyncAction.php b/app/Form/Actions/ExportSyncAction.php index 5c899baf..d9a9e65f 100644 --- a/app/Form/Actions/ExportSyncAction.php +++ b/app/Form/Actions/ExportSyncAction.php @@ -3,6 +3,7 @@ namespace App\Form\Actions; use App\Form\Models\Form; +use App\Form\Models\Participant; use App\Group; use Illuminate\Support\Collection; use Lorisleiva\Actions\Concerns\AsAction; @@ -15,7 +16,7 @@ class ExportSyncAction public Form $form; - public function handle(Form $form) + public function handle(Form $form): void { $this->form = $form; @@ -44,6 +45,9 @@ class ExportSyncAction $this->handle(Form::find($formId)); } + /** + * @param Collection $participants + */ private function allSheet(Collection $participants): TableDocumentData { $document = TableDocumentData::from(['title' => 'Anmeldungen für ' . $this->form->name, 'sheets' => []]); diff --git a/tests/Feature/Form/FormRegisterActionTest.php b/tests/Feature/Form/FormRegisterActionTest.php index 3301c465..ce0583eb 100644 --- a/tests/Feature/Form/FormRegisterActionTest.php +++ b/tests/Feature/Form/FormRegisterActionTest.php @@ -43,7 +43,6 @@ class FormRegisterActionTest extends FormTestCase ]), ]) ->create(); - ExportSyncAction::shouldRun()->shouldReceive('asJob')->once()->with($form->id); $this->register($form, ['vorname' => 'Max', 'nachname' => 'Muster', 'spitzname' => 'Abraham']) ->assertOk();