Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

what are the pros and cons with each one?

thanks

like image 280
never_had_a_name Avatar asked May 05 '10 15:05

never_had_a_name


2 Answers

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.

like image 57
nurikabe Avatar answered Sep 23 '22 06:09

nurikabe


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:

  • SimpleTest
  • Testilence
  • PHPSpec
  • Apache-Test
  • SnapTest
like image 36
Jon Winstanley Avatar answered Sep 23 '22 06:09

Jon Winstanley