简体   繁体   中英

How to adopt test driven development in Zend Framework 2?

I have basic knowledge of test driven development, from what I've read it has a lot benefits. I want to know how I can go adopting it in my Zend Framework 2 application (using MVC approach, Doctrine ORM, PHP 5.3).

From what I've read, each controller and model in the application will have a corresponding file containing methods that test the methods in the actual controllers and models. How do I set this up and how do I automate this?

You are trying to dive into the deep end. Before you go about testing an application in a specific application framework you should first learn about testing and TDD in general. I would suggest beginning with a book about the basics like Kent Becks "Test Driven Development by Example".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM