@@ -163,6 +163,7 @@ public function testJobWithSetUpCallbackFiresSetUp()
163163 'somevar ' ,
164164 'somevar2 ' ,
165165 )),
166+ 'id ' => Resque::generateJobId (),
166167 );
167168 $ job = new JobHandler ('jobs ' , $ payload );
168169 $ job ->perform ();
@@ -178,6 +179,7 @@ public function testJobWithTearDownCallbackFiresTearDown()
178179 'somevar ' ,
179180 'somevar2 ' ,
180181 )),
182+ 'id ' => Resque::generateJobId (),
181183 );
182184 $ job = new JobHandler ('jobs ' , $ payload );
183185 $ job ->perform ();
@@ -384,7 +386,8 @@ public function testUseDefaultFactoryToGetJobInstance()
384386 {
385387 $ payload = array (
386388 'class ' => 'Resque\Tests\Some_Job_Class ' ,
387- 'args ' => null
389+ 'args ' => null ,
390+ 'id ' => Resque::generateJobId ()
388391 );
389392 $ job = new JobHandler ('jobs ' , $ payload );
390393 $ instance = $ job ->getInstance ();
@@ -395,7 +398,8 @@ public function testUseFactoryToGetJobInstance()
395398 {
396399 $ payload = array (
397400 'class ' => 'Resque\Tests\Some_Job_Class ' ,
398- 'args ' => array (array ())
401+ 'args ' => array (array ()),
402+ 'id ' => Resque::generateJobId ()
399403 );
400404 $ job = new JobHandler ('jobs ' , $ payload );
401405 $ factory = new Some_Stub_Factory ();
@@ -408,7 +412,8 @@ public function testDoNotUseFactoryToGetInstance()
408412 {
409413 $ payload = array (
410414 'class ' => 'Resque\Tests\Some_Job_Class ' ,
411- 'args ' => array (array ())
415+ 'args ' => array (array ()),
416+ 'id ' => Resque::generateJobId ()
412417 );
413418 $ job = new JobHandler ('jobs ' , $ payload );
414419 $ factory = $ this ->getMockBuilder ('Resque\Job\FactoryInterface ' )
@@ -424,7 +429,8 @@ public function testJobStatusIsNullIfIdMissingFromPayload()
424429 {
425430 $ payload = array (
426431 'class ' => 'Resque\Tests\Some_Job_Class ' ,
427- 'args ' => null
432+ 'args ' => null ,
433+ 'id ' => Resque::generateJobId ()
428434 );
429435 $ job = new JobHandler ('jobs ' , $ payload );
430436 $ this ->assertEquals (null , $ job ->getStatus ());
@@ -434,7 +440,8 @@ public function testJobCanBeRecreatedFromLegacyPayload()
434440 {
435441 $ payload = array (
436442 'class ' => 'Resque\Tests\Some_Job_Class ' ,
437- 'args ' => null
443+ 'args ' => null ,
444+ 'id ' => Resque::generateJobId ()
438445 );
439446 $ job = new JobHandler ('jobs ' , $ payload );
440447 $ job ->recreate ();
0 commit comments