File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,8 @@ public function fresh(): static
226
226
227
227
public function resume (): void
228
228
{
229
- $ this ->dispatch ();
229
+ $ this ->fresh ()
230
+ ->dispatch ();
230
231
}
231
232
232
233
public function start (...$ arguments ): void
Original file line number Diff line number Diff line change 4
4
5
5
namespace Tests \Unit ;
6
6
7
- use Illuminate \Support \Carbon ;
8
7
use Tests \Fixtures \TestActivity ;
9
8
use Tests \Fixtures \TestChildWorkflow ;
10
9
use Tests \Fixtures \TestConcurrentWorkflow ;
@@ -18,9 +17,6 @@ final class WorkflowFakerTest extends TestCase
18
17
{
19
18
public function testTimeTravelWorkflow (): void
20
19
{
21
- $ now = Carbon::now ();
22
- Carbon::setTestNow ($ now );
23
-
24
20
WorkflowStub::fake ();
25
21
26
22
WorkflowStub::mock (TestActivity::class, 'activity ' );
@@ -38,7 +34,9 @@ public function testTimeTravelWorkflow(): void
38
34
39
35
$ workflow ->cancel ();
40
36
41
- Carbon::setTestNow ($ now ->copy ()->addSeconds (300 ));
37
+ $ this ->travel (5 )
38
+ ->minutes ();
39
+
42
40
$ workflow ->resume ();
43
41
44
42
$ this ->assertTrue ($ workflow ->isCanceled ());
You can’t perform that action at this time.
0 commit comments