mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 05:32:20 +00:00
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:
parent
5dc24ebbe4
commit
5f64653149
5 changed files with 33 additions and 33 deletions
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue