I think that we are witnessing the first wave of new testing tools in the PHP community that allow developers to wrap their applications in automated tests. I am familiar with the BDD-style that is being promoted in PHPSpec, through my work with Behat to create automated user acceptance tests. I think if you want a tl;dr version of PHPSpec I would tell you "write hybrid unit/integration tests using plain language".
He notes that writing code to match a specification has similar concepts to using unit testing for TDD (with something like PHPUnit). He points out a few interesting things like the use of mock objects and the fact that you'll still need to write some code to make tests work - that's unavoidable right now.
没有评论:
发表评论