您为Symfony使用哪个单元测试框架? [英] Which unit testing framework do you use for Symfony?
问题描述
您用于Symfony的哪个单元测试框架?
Which unit testing framework do you use for Symfony?
Lime还是PHPUnit?使用它们的利弊是什么?
Lime or PHPUnit? What are the pros and cons of using them?
推荐答案
在我看来,这是我想到的几件事:
In my opinion, here are a few things that come to my mind :
- PHPUnit与其他工具(例如,
- 硒(PHPUnit可以使用它打开真正的真实浏览器来测试您的网站)
- phpUnderControl 进行持续集成
- PHPUnit is more integrated with other tools, like, for instance,
- Selenium (PHPUnit can use it to open true real browsers to test your site)
- phpUnderControl for continuous-integration
但是请注意,我不使用symfony,也不使用石灰.
不过,除了那些使用symfony的人以外,我从未听说过有人谈论它-不好的事情,因为那天您将不得不使用另一个框架(是的,发生这种情况^^)But note I don't work with symfony, nor lime...
Still, I've never heards anyone speak about it, except for those working with symfony -- that not a good thing, for the day you'll have to work with another framework (yes, this happens ^^ )
一件事不在PHPUnit中:
One thing that's not in PHPUnit :- 假"浏览器(能够向应用程序发出HTTP请求,而无需使用Selenium打开真正的浏览器)
但是某些框架(Zend Framework确实带有Zend_Test组件)与PHPUnit集成(或使用它),同时允许将数据注入MVC并获取响应,而不必发出任何HTTP请求.
我不知道symfony是否允许,但这对于ZF/PHPUnit来说是一件好事^^But some frameworks (Zend Framework does, with it's Zend_Test component) integrate with PHPUnit (or use it), while allowing injection of data into the MVC and fetching of the response, without having to issue any HTTP Request.
I don't know if symfony allows that, but that's a nice thing with ZF/PHPUnit ^^
(是的,不是特定于symfony的答案;但是我所说的内容必须在该框架下仍然有效)这篇关于您为Symfony使用哪个单元测试框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!