Hi Felix,

Thanks for your reply.
I haven't really played around with Mocks that much myself but everything I've read about them is positive in the sense that when using Mocks with TDD, you are forced to think more in terms of interactions between objects, which leads to a better design with less conscious effort, (at least that's what I took from the articles I've read). I don't know how this fits with cake as you're really combining three objects (MVC) into one when thinking in terms of interactions, or at least when trying to use CRC cards with cake I've personally found it easier to use just one card for the M, V and C. Perhaps I'd need to model them separately to get the full benefits of Mocks. Any views on this?
I've tried the "only test the controllers via functional / acceptance testing" method and wasn't happy with it at all. This could be something to do with the fact that I was trying to learn cake, SimpleTest, Selenium and TDD all at the same time but I didn't feel comfortable testing controllers indirectly with Selenium this way. I do however think that Selenium would be great for acceptance tests (which are written after the user story is coded) but from a Test-first view, I don't think it's suitable.

Taking all this into account I think a better way to test controllers is essential for real agility (but I'm still learning) and I think Mock objects have a part to play in this also.

Just my €0.02,

Sonic

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to