MCPcopy Create free account
hub / github.com/taskforcesh/bullmq / testCanGetJobCounts

Method testCanGetJobCounts

php/tests/QueueTest.php:117–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 }
116
117 public function testCanGetJobCounts(): void
118 {
119 // Add some jobs
120 $this->queue->add('job-1', ['data' => 1]);
121 $this->queue->add('job-2', ['data' => 2]);
122 $this->queue->add('job-3', ['data' => 3], ['delay' => 60000]);
123
124 $counts = $this->queue->getJobCounts();
125
126 $this->assertArrayHasKey('waiting', $counts);
127 $this->assertArrayHasKey('delayed', $counts);
128 $this->assertGreaterThanOrEqual(2, $counts['waiting']);
129 $this->assertGreaterThanOrEqual(1, $counts['delayed']);
130 }
131
132 public function testCanGetJobCountByTypes(): void
133 {

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
getJobCountsMethod · 0.45

Tested by

no test coverage detected