()
| 259 | } |
| 260 | |
| 261 | public function testCanPromoteDelayedJobs(): void |
| 262 | { |
| 263 | // Add delayed jobs |
| 264 | $this->queue->add('delayed-1', ['data' => 1], ['delay' => 60000]); |
| 265 | $this->queue->add('delayed-2', ['data' => 2], ['delay' => 60000]); |
| 266 | $this->queue->add('delayed-3', ['data' => 3], ['delay' => 60000]); |
| 267 | |
| 268 | $counts = $this->queue->getJobCounts(); |
| 269 | $this->assertEquals(3, $counts['delayed']); |
| 270 | |
| 271 | // Promote all delayed jobs |
| 272 | $this->queue->promoteJobs(); |
| 273 | |
| 274 | // Check they moved to waiting |
| 275 | $counts = $this->queue->getJobCounts(); |
| 276 | $this->assertEquals(0, $counts['delayed']); |
| 277 | $this->assertGreaterThanOrEqual(3, $counts['waiting']); |
| 278 | } |
| 279 | |
| 280 | public function testCanObliterateQueue(): void |
| 281 | { |
nothing calls this directly
no test coverage detected