Monday, May 3, 2010

model testing - any ideas?

unit testing with cake usually is very nice
but what model testing is concerned it drives me nuts

if i want to work on fixtures i have to include all related models of
any submodel as well (MANUALLY).
var $fixtures = array('app.daily_stat', 'app.country',
'app.country_province', 'app.user_stat', ...[and 50 others connected
to user which unfortunately is connected to daily_stat...]]);

this really is annoying and time-consuming. often times, the relations
(as defined inside each model via $hasMany etc) change - code-
redundance of the test cases make it hard to keep up with those
changes

did anyone write some kind of hack to autoload fixtures like models
are in normal productive mode - without hardcoding them? the
neccessary models can easily be retrieved from within the appropriate
model relation arrays, can they not?

thx mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: