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

Method testCanCreateJobWithOptions

php/tests/JobTest.php:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 }
23
24 public function testCanCreateJobWithOptions(): void
25 {
26 $queue = $this->createMock(Queue::class);
27 $job = new Job($queue, 'test-job', ['foo' => 'bar'], [
28 'jobId' => 'custom-id',
29 'delay' => 1000,
30 'priority' => 5,
31 ]);
32
33 $this->assertEquals('custom-id', $job->id);
34 $this->assertEquals(1000, $job->opts->delay);
35 $this->assertEquals(5, $job->opts->priority);
36 }
37
38 public function testJobHasTimestamp(): void
39 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected