I haven't used SimpleTest myself, so I can't say much in a way of comparison. Just by observation though, the PHPUnit syntax seems much more verbose.
The PHPUnit Manual is a great source of documentation, and covers most areas of the framework. My only complaint about the manual is that some areas lack detail.
My main reason for using PHPUnit over SimpleTest is that it has great Phing integration.
I don't know if you'd want to switch per-se, but I like phpt for testing small libraries of code or getting tests out the door sooner rather than later, if there are none in an existing library that needs to be tested.
phpt won't scale as well as Simpletest, but again, the right tool for the right job. Take a look at this article for an in-depth discussion to get you ramped up.
发布评论
评论(5)
我认为两者都不会很快消失。 Simpletest 由一小群但参与其中的人维护。
PHPUnit 似乎拥有更大的用户群,这可以算作切换的一个论据。 不过我对 Simpletest 很满意。
I don't think either is going away anytime soon. Simpletest is maintained by a small, but involved group of people.
PHPUnit seems to have a bigger userbase, which may count as an argument for switching. I'm quite happy with Simpletest though.
我自己没有使用过SimpleTest,所以我不能说太多的比较。 但仅通过观察,PHPUnit 语法似乎更加冗长。
PHPUnit 手册 是一个很好的文档来源,涵盖了大部分领域框架的。 我对该手册的唯一抱怨是某些区域缺乏细节。
我使用 PHPUnit 而不是 SimpleTest 的主要原因是它具有出色的 Phing 集成。
I haven't used SimpleTest myself, so I can't say much in a way of comparison. Just by observation though, the PHPUnit syntax seems much more verbose.
The PHPUnit Manual is a great source of documentation, and covers most areas of the framework. My only complaint about the manual is that some areas lack detail.
My main reason for using PHPUnit over SimpleTest is that it has great Phing integration.
我刚刚回答了类似的问题并补充说有phpt。 phpt 还集成到 PHPUnit 中。
I just answered a similar question and added that there's phpt. phpt also integrates into PHPUnit.
我推荐 behat (+mink)
http://behat.org/
这是功能/集成测试,但它在更短的时间内涵盖了更多的代码。 PS
实际上,您可以使用它来编写单元/测试,但这有点矫枉过正......
I would recommend behat (+mink)
http://behat.org/
It's functional/integrational testing, but it covers much more code in much less time...
P.S. You can, actually, use it to write unit/tests, but it's a bit of overkill...
我不知道您是否想切换本身,但我喜欢 phpt 来测试小型代码库或尽早进行测试(如果没有)需要测试的现有库。
phpt 的扩展性不如 Simpletest,但同样,它是适合正确工作的正确工具。 请参阅这篇文章进行深入讨论,让您快速入门向上。
I don't know if you'd want to switch per-se, but I like phpt for testing small libraries of code or getting tests out the door sooner rather than later, if there are none in an existing library that needs to be tested.
phpt won't scale as well as Simpletest, but again, the right tool for the right job. Take a look at this article for an in-depth discussion to get you ramped up.