Change job classes to be instantiated rather than calling methods statically. This obviously makes it easier for state information to be destroyed after a job runs. This change is NOT backwards compatible and requests job classes be rewritten. Jobs also no longer receive arguments in the perform/setUp/tearDown methods but instead are passed as a $args variable to the instantiated job

This commit is contained in:
Chris Boulton 2010-08-01 15:23:41 +10:00
parent 5dc24ebbe4
commit 5f64653149
5 changed files with 33 additions and 33 deletions

View file

@ -150,7 +150,6 @@ class Resque_Tests_JobTest extends Resque_Tests_TestCase
$job->perform();
$this->assertTrue(Test_Job_With_SetUp::$called);
$this->assertEquals($payload['args'], Test_Job_With_SetUp::$data);
}
public function testJobWithTearDownCallbackFiresSetUp()
@ -166,6 +165,5 @@ class Resque_Tests_JobTest extends Resque_Tests_TestCase
$job->perform();
$this->assertTrue(Test_Job_With_TearDown::$called);
$this->assertEquals($payload['args'], Test_Job_With_TearDown::$data);
}
}