If I'm running the code via url it is working (eg: http://localhost:8080/projects/emailNewProject/2008098)
But if I'm trying to access it via http://localhost:8080/test.php?show=cases&app=true it is throwing the error : Missing database table for the model Customer
I tried to change the datasource in controller using :
Configure::write('currentDataSource', 'testdb');
$dataSource = Configure::read('currentDataSource');
$this->setDataSource($dataSource);
still it doesn't affect!!
class ProjectsControllerTest extends CakeTestCase{
function testEmailNewProject()
{
$id = 2008098;
$result = $this->testAction('/projects/emailNewProject', array('fixturize' => true, 'data' => $id, 'method' => 'post'));
debug($result);
}
}