Symfony unit testing

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
systemick
Forum Newbie
Posts: 1
Joined: Thu May 27, 2010 10:22 am
Location: Leeds, United Kingdom

Symfony unit testing

Post 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?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Symfony unit testing

Post by Weirdan »

From what I heard the preferred unit testing framework for cake is SimpleTest.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Symfony unit testing

Post 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.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Symfony unit testing

Post 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 :wink: http://book.cakephp.org/view/1196/Testing
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply