File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ public function definition(): array
1616 {
1717 return [
1818 /** @phpstan-ignore-next-line */
19- 'workflow_id ' => fn () => WorkflowFactory::new ()->create ()->id ,
19+ 'workflow_id ' => fn () => WorkflowFactory::new ()->create ()->id ,
2020 /** @phpstan-ignore-next-line */
21- 'from_id ' => fn () => WorkflowStatusFactory::new ()->create ()->id ,
21+ 'from_id ' => fn () => WorkflowStatusFactory::new ()->create ()->id ,
2222 /** @phpstan-ignore-next-line */
23- 'to_id ' => fn () => WorkflowStatusFactory::new ()->create ()->id ,
23+ 'to_id ' => fn () => WorkflowStatusFactory::new ()->create ()->id ,
2424 'order ' => random_int (1 , 999 ),
2525 ];
2626 }
Original file line number Diff line number Diff line change 1818 WorkflowTransitionFactory::new ()->workflow ($ workflow ->id )->from ($ mid1 ->to_id )->exit ()->create ();
1919 WorkflowTransitionFactory::new ()->workflow ($ workflow ->id )->from ($ mid2 ->to_id )->exit ()->create ();
2020
21-
2221 $ this ->secondaryWorkflow = $ workflow = WorkflowFactory::new ()->create ();
2322 WorkflowTransitionFactory::new ()->workflow ($ this ->secondaryWorkflow ->id )->entry ()->create ();
2423});
9796});
9897
9998test ('it deletes model statuses when model is deleted ' , function () {
100- ($ model = new WorkflowableModel () )->setDefaultWorkflowName ($ this ->workflow ->name )->save ();
99+ ($ model = new WorkflowableModel )->setDefaultWorkflowName ($ this ->workflow ->name )->save ();
101100 expect (WorkflowModelStatus::count ())->toBe (1 );
102101
103102 $ model ->delete ();
104103 expect (WorkflowModelStatus::count ())->toBe (0 );
105104});
106105
107106test ('it queries by workflow ' , function () {
108- ($ model = new WorkflowableModel () )->setDefaultWorkflowName ($ this ->workflow ->name )->save ();
107+ ($ model = new WorkflowableModel )->setDefaultWorkflowName ($ this ->workflow ->name )->save ();
109108
110109 expect (WorkflowableModel::query ()->inWorkflow ($ this ->workflow ->name )->count ())->toBe (1 )
111- ->and (WorkflowableModel::query ()->inWorkflow ($ this ->secondaryWorkflow ->name )->count ())->toBe (0 );
110+ ->and (WorkflowableModel::query ()->inWorkflow ($ this ->secondaryWorkflow ->name )->count ())->toBe (0 );
112111});
113112
114113test ('it has toString ' , function () {
You can’t perform that action at this time.
0 commit comments