@@ -163,6 +163,7 @@ public function testJobWithSetUpCallbackFiresSetUp()
163
163
'somevar ' ,
164
164
'somevar2 ' ,
165
165
)),
166
+ 'id ' => Resque::generateJobId (),
166
167
);
167
168
$ job = new JobHandler ('jobs ' , $ payload );
168
169
$ job ->perform ();
@@ -178,6 +179,7 @@ public function testJobWithTearDownCallbackFiresTearDown()
178
179
'somevar ' ,
179
180
'somevar2 ' ,
180
181
)),
182
+ 'id ' => Resque::generateJobId (),
181
183
);
182
184
$ job = new JobHandler ('jobs ' , $ payload );
183
185
$ job ->perform ();
@@ -384,7 +386,8 @@ public function testUseDefaultFactoryToGetJobInstance()
384
386
{
385
387
$ payload = array (
386
388
'class ' => 'Resque\Tests\Some_Job_Class ' ,
387
- 'args ' => null
389
+ 'args ' => null ,
390
+ 'id ' => Resque::generateJobId ()
388
391
);
389
392
$ job = new JobHandler ('jobs ' , $ payload );
390
393
$ instance = $ job ->getInstance ();
@@ -395,7 +398,8 @@ public function testUseFactoryToGetJobInstance()
395
398
{
396
399
$ payload = array (
397
400
'class ' => 'Resque\Tests\Some_Job_Class ' ,
398
- 'args ' => array (array ())
401
+ 'args ' => array (array ()),
402
+ 'id ' => Resque::generateJobId ()
399
403
);
400
404
$ job = new JobHandler ('jobs ' , $ payload );
401
405
$ factory = new Some_Stub_Factory ();
@@ -408,7 +412,8 @@ public function testDoNotUseFactoryToGetInstance()
408
412
{
409
413
$ payload = array (
410
414
'class ' => 'Resque\Tests\Some_Job_Class ' ,
411
- 'args ' => array (array ())
415
+ 'args ' => array (array ()),
416
+ 'id ' => Resque::generateJobId ()
412
417
);
413
418
$ job = new JobHandler ('jobs ' , $ payload );
414
419
$ factory = $ this ->getMockBuilder ('Resque\Job\FactoryInterface ' )
@@ -424,7 +429,8 @@ public function testJobStatusIsNullIfIdMissingFromPayload()
424
429
{
425
430
$ payload = array (
426
431
'class ' => 'Resque\Tests\Some_Job_Class ' ,
427
- 'args ' => null
432
+ 'args ' => null ,
433
+ 'id ' => Resque::generateJobId ()
428
434
);
429
435
$ job = new JobHandler ('jobs ' , $ payload );
430
436
$ this ->assertEquals (null , $ job ->getStatus ());
@@ -434,7 +440,8 @@ public function testJobCanBeRecreatedFromLegacyPayload()
434
440
{
435
441
$ payload = array (
436
442
'class ' => 'Resque\Tests\Some_Job_Class ' ,
437
- 'args ' => null
443
+ 'args ' => null ,
444
+ 'id ' => Resque::generateJobId ()
438
445
);
439
446
$ job = new JobHandler ('jobs ' , $ payload );
440
447
$ job ->recreate ();
0 commit comments