@@ 19-28 (lines=10) @@ | ||
16 | * @param string $status |
|
17 | * @param bool $expected |
|
18 | */ |
|
19 | public function testCanRunTask($status, $expected) |
|
20 | { |
|
21 | /** @var QueuedJobDescriptor $descriptor */ |
|
22 | $descriptor = $this->objFromFixture(QueuedJobDescriptor::class, 'dummy_job'); |
|
23 | $descriptor->JobStatus = $status; |
|
24 | $descriptor->write(); |
|
25 | ||
26 | $task = new DoormanQueuedJobTask($descriptor); |
|
27 | $this->assertSame($expected, $task->canRunTask()); |
|
28 | } |
|
29 | ||
30 | /** |
|
31 | * @return array[] |
|
@@ 48-57 (lines=10) @@ | ||
45 | * @param string $status |
|
46 | * @param bool $expected |
|
47 | */ |
|
48 | public function testIsCancelled($status, $expected) |
|
49 | { |
|
50 | /** @var QueuedJobDescriptor $descriptor */ |
|
51 | $descriptor = $this->objFromFixture(QueuedJobDescriptor::class, 'dummy_job'); |
|
52 | $descriptor->JobStatus = $status; |
|
53 | $descriptor->write(); |
|
54 | ||
55 | $task = new DoormanQueuedJobTask($descriptor); |
|
56 | $this->assertSame($expected, $task->isCancelled()); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @return array[] |