try adding the connection to the array

public function testIndex() {
    $result = $this->testAction('/news/index', array(
            'connection'    => 'test',
            'fixturize' => true,
            'return' => 'vars'
    ));
    debug($result);
}


On Thu, Feb 12, 2009 at 8:12 AM, Raph <[email protected]> wrote:

>
> I have a problem with using fixtures in my controller test. When I use
> fixtures in my model test everything is ok (tests pass without
> exectpions), but in controller tests I have exceptions in tests with
> table missing errors.
>
> I read posts about issues like mine which suggest that it was fixed,
> but I have last release of Cake and it dosen't help.
>
> This is code of my controller test:
>
> class NewsControllerTestCase extends CakeTestCase {
>    public $fixtures = array('app.news');
>
>    public function startCase() {
>        echo '<h1>Starting Test Case</h1>';
>    }
>
>    public function endCase() {
>        echo '<h1>Ending Test Case</h1>';
>    }
>
>    public function startTest($method) {
>
>        echo '<h3>Starting method ' . $method . '</h3>';
>    }
>
>    public function endTest($method) {
>        echo '<hr />';
>    }
>
>    public function testIndex() {
>        $result = $this->testAction('/news/index', array(
>                'fixturize' => true,
>            'return' => 'vars'
>        ));
>        debug($result);
>    }
> }
>
> I have error "Table 'test_db.news' doesn't exist" three times.
>
> Any ideas?
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to