File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Vectorial1024 \LaravelProcessAsync ;
6+
7+ use InvalidArgumentException ;
8+ use loophp \phposinfo \OsInfo ;
9+ use RuntimeException ;
10+
11+ /**
12+ * The fake AsyncTaskStatus class for testing. Fake async tasks are presumed to be running by default.
13+ */
14+ class FakeAsyncTaskStatus extends AsyncTaskStatus
15+ {
16+ private bool $ fakeIsRunning = true ;
17+
18+ /**
19+ * Constructs a fake status object. Fake async tasks are presumed to be running by default.
20+ * @param string $fakeTaskID The task ID of the fake async task.
21+ */
22+ public function __construct (string $ fakeTaskID ) {
23+ parent ::__construct ($ fakeTaskID );
24+ }
25+
26+ /**
27+ * Returns whether the fake task is currently "running".
28+ * @return bool The faked "task is running" status.
29+ */
30+ public function isRunning (): bool
31+ {
32+ return $ this ->fakeIsRunning ;
33+ }
34+
35+
36+ }
You can’t perform that action at this time.
0 commit comments