What i've done is to modified the app_model _construct for this:
function __construct($id = false, $table = null, $ds = null)
{
parent::__construct($id, $table, $ds);
if (defined('APP_TEST_CASES'))
{
$this->useDbConfig = 'testSuite';
}
}
APP_TEST_CASES is a constant defined in test.php so i feel is a secure
way of doing this, although im sure is not the best way of doing it.
On 10 oct, 08:50, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> Am using a fairly recent 1.2
>
> In my test I have a statement like $this->testAction('/posts/index');
>
> I would expect that the Post model (inside the Posts controller) would
> use the "test" DB config while testing but it does not uses the
> 'default' instead
>
> I can't seem to find a simple way to do the same...
>
> I think I am missing something obvious - If someone can enlighten it
> would be a help
>
> TIA
>
> Tarique
>
> --
> =============================================================
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =============================================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---