Tutorial :should one use phpunit or lime with symfony? [closed]



Question:

i just wonder, should one use symfony's lime or phpunit for testing?

what are the pros and cons with each one?

thanks


Solution:1

Lime is well covered in the Symfony documentation and so it may be the best place to start.

If you 'outgrow' lime then PHPUnit may well be your next port of call, although there are alternatives:


Solution:2

Lime is a fairly simple test framework. It's easy to write tests for and surprisingly fast, though also brittle. You can run into problems with partials and slots, for example.

Lime2 was released in an alpha state in late 2009 and then discontinued in favor of PHPUnit. PHPUnit is officially supported in the upcoming Symfony2.

I use both. While Lime is great for "quick and dirty" tests, if you want to build a future-proof test suite of any substance, go with PHPUnit.


Solution:3

Symfony has moved to phpunit has the standard tests utility in Symfony2 and that's why you should use phpunit.

It will make easier for you to write your tests and integrate them with your code.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »