On Tue, Oct 6, 2009 at 7:07 PM, p_W <[email protected]> wrote:
> > I have app_production and an app_test databases, and I set > app_production up just how I wanted it, kept app_test empty, and > used ./cake bake all to generate the models, controllers, views, and > tests. I have not altered the tests in any way. The functional tests > work fine, but the unit tests give me a 'Database table model_name for > Model ModelName was not found' for all models. My test database > should be connected fine, as it is set up the same as my production db > and it is connecting just fine. ./cake testsuite app all is not > working either, I get a similar error message. > Quoting from the book (http://book.cakephp.org/view/363/Testing-models): > If your model is associated with other models, you will need to include ALL > the fixtures for each associated model even if you don't use them. For > example: A hasMany B hasMany C hasMany D. In ATestCase you will have to > include fixtures for a, b, c and d. If you have a Post model which is related to the Comment model, you will need to add the Comment fixture to the PostTestCase, and so on for every model which has a relationship. var $fixtures = array( 'app.post', 'app.comment ); --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
