class TestJobShell extends AppShell
{
public function test()
{
$path = Router::url('/',true);
$this->out($path);
}
}
Step 2
In app/Config/core.php file.
Add
Configure::write('App.fullBaseUrl', 'http://domain.com');
Step 3
Run cake TestJob test
It returns http://domain.com.
Which is correctly according to the doc
Assert
Run cake CakeResque.CakeResque enqueue default TestJob 'test'
Check the resque-worker-error.log file cake CakeResque.CakeResque tail
It outputs http://localhost
Which is incorrect.
Test Case
Background
Step 1:
Create a simple test job
Step 2
In app/Config/core.php file. Add
Configure::write('App.fullBaseUrl', 'http://domain.com');
Step 3
Run
cake TestJob test
It returnshttp://domain.com
. Which is correctly according to the docAssert
Run
cake CakeResque.CakeResque enqueue default TestJob 'test'
Check the resque-worker-error.log filecake CakeResque.CakeResque tail
It outputshttp://localhost
Which is incorrect.