Thursday, December 3, 2009

Re: Are unit tests REALLY a unit tests?

you can use autoload in 1.2/1.3 with http://github.com/mcurry/lazy_loader

On 3 дек, 13:53, Grzegorz Pawlik <grzegorzpaw...@gmail.com> wrote:
> Ok then. I thought I'm doing something in a un-smart way. One more
> reason to wait for php5 only CakePHP (v2 I suppose ;)).
> Thanks and good luck!
>
> Greg
>
> 2009/12/2 mark_story <mark.st...@gmail.com>:
>
>
>
> > Although you don't use all the relations, all of the fixtures are
> > needed due to the way associations are implemented by CakePHP.  This
> > is mostly a side effect of PHP4 support and will be removed once
> > autoloading of models can be achieved.
>
> > -Mark
>
> > On Dec 1, 9:00 am, Grzegorz Pawlik <grzegorzpaw...@gmail.com> wrote:
> >> Those should test single unit. I know, that sometimes it's convenient
> >> to test model with (some close) associations.
>
> >> But I find quite odd that situation:
> >> Creating PackageTest, and including app.packages_appendix and
> >> app.appendix fixtures - it's reasonable for now.
> >> But why the heck I need to include app.entry fixture (Appendix belongs
> >> to Entry), and app.user (Entry belongs to User) and app.group (User is
> >> in Group), and so - to the end of relation chain.
> >> If I don't do that - I'll have missing database info instead of test
> >> results.
>
> >> I know that those are related (by transitions), but I never used so
> >> deep recursion. Even If I did, I do It by contain, so it would be
> >> better to get error from Containable, that I'm trying to use unknown
> >> model.
>
> >> After adding model and relations to my project some of my test cases
> >> seize to pass untill I tell them to use fixtures they don't need.
>
> >> Or am I doing something wrong?
>
> >> Greg
> >> ps. Thanks for CakePHP - it's great!
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 athttp://groups.google.com/group/cake-php?hl=en

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: