Unit tests should not be directly accessing payload[args] now that we have getArguments()

This commit is contained in:
Chris Boulton 2011-09-16 15:30:36 +10:00
parent ea1ceed742
commit 700af834b4

View File

@ -65,7 +65,7 @@ class Resque_Tests_JobTest extends Resque_Tests_TestCase
Resque::enqueue('jobs', 'Test_Job', $args); Resque::enqueue('jobs', 'Test_Job', $args);
$job = Resque_Job::reserve('jobs'); $job = Resque_Job::reserve('jobs');
$this->assertEquals($args, $job->payload['args']); $this->assertEquals($args, $job->getArguments());
} }
public function testAfterJobIsReservedItIsRemoved() public function testAfterJobIsReservedItIsRemoved()
@ -97,7 +97,7 @@ class Resque_Tests_JobTest extends Resque_Tests_TestCase
$newJob = Resque_Job::reserve('jobs'); $newJob = Resque_Job::reserve('jobs');
$this->assertEquals($job->payload['class'], $newJob->payload['class']); $this->assertEquals($job->payload['class'], $newJob->payload['class']);
$this->assertEquals($job->payload['args'], $newJob->payload['args']); $this->assertEquals($job->payload['args'], $newJob->getArguments());
} }
public function testFailedJobExceptionsAreCaught() public function testFailedJobExceptionsAreCaught()