I am curious to know how we can test our code using unit test in plain PHP.
Is their any guideline for this.
And how we can do unit testing when we use MVC architecture to create website.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s basically only one answer to this question: PHPUnit.
It’s the biggest testing framework in PHP. Best documented, most users, most capabilities, industry-standard. All you’re looking for. The manual is here.
As for MVC: writing testable code doesn’t have anything to do with the design pattern you’re programming by.