File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use Workflow \ActivityStub ;
88use Workflow \ChildWorkflowStub ;
9+ use Workflow \SignalMethod ;
910use Workflow \Workflow ;
1011
1112class TestParentWorkflow extends Workflow
1213{
14+ #[SignalMethod]
15+ public function ping (): void
16+ {
17+ // Do nothing
18+ }
19+
1320 public function execute ()
1421 {
1522 $ otherResult = yield ChildWorkflowStub::make (TestChildWorkflow::class);
Original file line number Diff line number Diff line change @@ -255,6 +255,14 @@ public function testParentPending(): void
255255 'result ' => Serializer::serialize ('activity ' ),
256256 ]);
257257
258+ $ storedParentWorkflow ->signals ()
259+ ->create ([
260+ 'method ' => 'ping ' ,
261+ 'arguments ' => Serializer::serialize ([]),
262+ 'created_at ' => now ()
263+ ->addSeconds (1 ),
264+ ]);
265+
258266 $ childWorkflow = WorkflowStub::load (WorkflowStub::make (TestChildWorkflow::class)->id ());
259267
260268 $ storedChildWorkflow = StoredWorkflow::findOrFail ($ childWorkflow ->id ());
You can’t perform that action at this time.
0 commit comments