@@ -42,7 +42,7 @@ public function testExecuteWithoutSchedules()
42
42
$ this ->assertSame ("\nScheduler \n========= \n\n [ERROR] No schedules found. {$ filler }\n\n" , $ tester ->getDisplay (true ));
43
43
}
44
44
45
- public function testExecuteWithScheduleWithoutTriggerShowingNoNextRun ()
45
+ public function testExecuteWithScheduleWithoutTriggerDoesNotDisplayMessage ()
46
46
{
47
47
$ schedule = new Schedule ();
48
48
$ schedule ->add (RecurringMessage::trigger (new CallbackTrigger (fn () => null , 'test ' ), new \stdClass ()));
@@ -64,6 +64,41 @@ public function testExecuteWithScheduleWithoutTriggerShowingNoNextRun()
64
64
65
65
$ tester ->execute ([], ['decorated ' => false ]);
66
66
67
+ $ this ->assertSame ("\n" .
68
+ "Scheduler \n" .
69
+ "========= \n" .
70
+ "\n" .
71
+ "schedule_name \n" .
72
+ "------------- \n" .
73
+ "\n" .
74
+ " --------- --------- ---------- \n" .
75
+ " Message Trigger Next Run \n" .
76
+ " --------- --------- ---------- \n" .
77
+ "\n" , $ tester ->getDisplay (true ));
78
+ }
79
+
80
+ public function testExecuteWithScheduleWithoutTriggerShowingNoNextRunWithAllOption ()
81
+ {
82
+ $ schedule = new Schedule ();
83
+ $ schedule ->add (RecurringMessage::trigger (new CallbackTrigger (fn () => null , 'test ' ), new \stdClass ()));
84
+
85
+ $ schedules = $ this ->createMock (ServiceProviderInterface::class);
86
+ $ schedules
87
+ ->expects ($ this ->once ())
88
+ ->method ('getProvidedServices ' )
89
+ ->willReturn (['schedule_name ' => $ schedule ])
90
+ ;
91
+ $ schedules
92
+ ->expects ($ this ->once ())
93
+ ->method ('get ' )
94
+ ->willReturn ($ schedule )
95
+ ;
96
+
97
+ $ command = new DebugCommand ($ schedules );
98
+ $ tester = new CommandTester ($ command );
99
+
100
+ $ tester ->execute (['--all ' => true ], ['decorated ' => false ]);
101
+
67
102
$ this ->assertSame ("\n" .
68
103
"Scheduler \n" .
69
104
"========= \n" .
0 commit comments