Page 1 of 1
Symfony unit testing
Posted: Thu May 27, 2010 2:00 pm
by systemick
I'm about to quote for a piece of work which the client has specified should be done in CakePHP. The client has also specified that unit testing must be done. I know the Symfony framework has unit testing 'built in' as it were. Is this the case with CakePHP or would I have to use PHPUnit?
Re: Symfony unit testing
Posted: Thu May 27, 2010 2:29 pm
by Weirdan
From what I heard the preferred unit testing framework for cake is SimpleTest.
Re: Symfony unit testing
Posted: Wed Jun 16, 2010 11:53 am
by josh
The advantage of PHPUnit is running parts of your tests. When your app is a few months old with a few hundred or thousand tests, it can take minutes for the tests, instead of the desired seconds. PHPUnit lets you run individual tests, all tests in a given file, all test files in a given directory (recursively). SimpleTest is just that, too simple for this need.
Using the same testing framework as your MVC framework is a novel idea, but in practice you don't really need to run all those tests at the same time, so it wouldn't matter if their unit tests weren't interoperable.
Re: Symfony unit testing
Posted: Wed Jun 16, 2010 1:02 pm
by AbraCadaver
Weirdan wrote:From what I heard the preferred unit testing framework for cake is SimpleTest.
Yes, and there's an entire section in manual about it
http://book.cakephp.org/view/1196/Testing