@@ -14,7 +14,7 @@ public function testPushProperlyPushesJobOntoIron()
1414 {
1515 $ queue = new Illuminate \Queue \IronQueue ($ iron = m::mock ('IronMQ ' ), $ crypt = m::mock ('Illuminate\Encryption\Encrypter ' ), m::mock ('Illuminate\Http\Request ' ), 'default ' );
1616 $ crypt ->shouldReceive ('encrypt ' )->once ()->with (json_encode (array ('job ' => 'foo ' , 'data ' => array (1 , 2 , 3 ))))->andReturn ('encrypted ' );
17- $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' );
17+ $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' )-> andReturn (( object ) array ( ' id ' => 1 )) ;
1818 $ queue ->push ('foo ' , array (1 , 2 , 3 ));
1919 }
2020
@@ -25,7 +25,7 @@ public function testPushProperlyPushesJobOntoIronWithClosures()
2525 $ name = 'Foo ' ;
2626 $ closure = new Illuminate \Support \SerializableClosure ($ innerClosure = function () use ($ name ) { return $ name ; });
2727 $ crypt ->shouldReceive ('encrypt ' )->once ()->with (json_encode (array ('job ' => 'IlluminateQueueClosure ' , 'data ' => array ('closure ' => serialize ($ closure )))))->andReturn ('encrypted ' );
28- $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' );
28+ $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' )-> andReturn (( object ) array ( ' id ' => 1 )) ;
2929 $ queue ->push ($ innerClosure );
3030 }
3131
@@ -34,7 +34,7 @@ public function testDelayedPushProperlyPushesJobOntoIron()
3434 {
3535 $ queue = new Illuminate \Queue \IronQueue ($ iron = m::mock ('IronMQ ' ), $ crypt = m::mock ('Illuminate\Encryption\Encrypter ' ), m::mock ('Illuminate\Http\Request ' ), 'default ' );
3636 $ crypt ->shouldReceive ('encrypt ' )->once ()->with (json_encode (array ('job ' => 'foo ' , 'data ' => array (1 , 2 , 3 ))))->andReturn ('encrypted ' );
37- $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' , array ('delay ' => 5 ));
37+ $ iron ->shouldReceive ('postMessage ' )->once ()->with ('default ' , 'encrypted ' , array ('delay ' => 5 ))-> andReturn (( object ) array ( ' id ' => 1 )) ;
3838 $ queue ->later (5 , 'foo ' , array (1 , 2 , 3 ));
3939 }
4040
0 commit comments