@@ -40,11 +40,10 @@ public function testJobCanBeQueued()
4040 $ this ->assertTrue ((bool )Resque::enqueue ('jobs ' , 'Test_Job ' ));
4141 }
4242
43- /**
44- * @expectedException \Resque\Exceptions\RedisException
45- */
4643 public function testRedisErrorThrowsExceptionOnJobCreation ()
4744 {
45+ $ this ->expectException ('\Resque\Exceptions\RedisException ' );
46+
4847 $ mockCredis = $ this ->getMockBuilder ('Credis_Client ' )
4948 ->setMethods (['connect ' , '__call ' ])
5049 ->getMock ();
@@ -69,11 +68,10 @@ public function testQeueuedJobCanBeReserved()
6968 $ this ->assertEquals ('Test_Job ' , $ job ->payload ['class ' ]);
7069 }
7170
72- /**
73- * @expectedException InvalidArgumentException
74- */
7571 public function testObjectArgumentsCannotBePassedToJob ()
7672 {
73+ $ this ->expectException ('InvalidArgumentException ' );
74+
7775 $ args = new stdClass ();
7876 $ args ->test = 'somevalue ' ;
7977 Resque::enqueue ('jobs ' , 'Test_Job ' , $ args );
@@ -146,22 +144,20 @@ public function testFailedJobExceptionsAreCaught()
146144 $ this ->assertEquals (1 , Stat::get ('failed: ' .$ this ->worker ));
147145 }
148146
149- /**
150- * @expectedException \Resque\Exceptions\ResqueException
151- */
152147 public function testJobWithoutPerformMethodThrowsException ()
153148 {
149+ $ this ->expectException ('\Resque\Exceptions\ResqueException ' );
150+
154151 Resque::enqueue ('jobs ' , 'Test_Job_Without_Perform_Method ' );
155152 $ job = $ this ->worker ->reserve ();
156153 $ job ->worker = $ this ->worker ;
157154 $ job ->perform ();
158155 }
159156
160- /**
161- * @expectedException Resque\Exceptions\ResqueException
162- */
163157 public function testInvalidJobThrowsException ()
164158 {
159+ $ this ->expectException ('Resque\Exceptions\ResqueException ' );
160+
165161 Resque::enqueue ('jobs ' , 'Invalid_Job ' );
166162 $ job = $ this ->worker ->reserve ();
167163 $ job ->worker = $ this ->worker ;
@@ -363,7 +359,7 @@ public function testDequeueSeveralItemsWithArgs()
363359 $ this ->assertEquals ($ removedItems , 2 );
364360 $ this ->assertEquals (Resque::size ($ queue ), 1 );
365361 $ item = Resque::pop ($ queue );
366- $ this ->assertInternalType ( ' array ' , $ item ['args ' ]);
362+ $ this ->assertIsArray ( $ item ['args ' ]);
367363 $ this ->assertEquals (10 , $ item ['args ' ][0 ]['bar ' ], 'Wrong items were dequeued from queue! ' );
368364 }
369365
0 commit comments