File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
tests/unit/Resource/Logbook Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class Flow extends AbstractResource
1919 public const STATE_SUCCESS = 'success ' ;
2020 public const STATE_REVERTED = 'reverted ' ;
2121 public const STATE_RUNNING = 'running ' ;
22+ public const STATE_WAITING = 'waiting ' ;
2223
2324 protected array $ dateAttributes = [
2425 'created_at ' ,
@@ -44,4 +45,9 @@ public function isRunning(): bool
4445 {
4546 return $ this ->state === self ::STATE_RUNNING ;
4647 }
48+
49+ public function isWaiting (): bool
50+ {
51+ return $ this ->state === self ::STATE_WAITING ;
52+ }
4753}
Original file line number Diff line number Diff line change @@ -56,4 +56,16 @@ public function testIsRunningReturnsFalse()
5656 $ flow = new Flow (['state ' => 'success ' ]);
5757 $ this ->assertFalse ($ flow ->isRunning ());
5858 }
59+
60+ public function testIsWaitingReturnsTrue ()
61+ {
62+ $ flow = new Flow (['state ' => 'waiting ' ]);
63+ $ this ->assertTrue ($ flow ->isWaiting ());
64+ }
65+
66+ public function testIsWaitingReturnsFalse ()
67+ {
68+ $ flow = new Flow (['state ' => 'running ' ]);
69+ $ this ->assertFalse ($ flow ->isWaiting ());
70+ }
5971}
You can’t perform that action at this time.
0 commit comments