should one use phpunit or lime with symfony? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this questioni just wonder, should one use symfony's lime or phpunit for testing?
what are the pros and cons with each one?
thanks
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.
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
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.
精彩评论