How to Write Test Case for Handler Using Testbox

A month ago I have posted the testbox example for unit testing and promise to post a example of handler testcase using testbox.

Well, I found significant difference in the handler test case. Like it's bit difficult to use and access mock of any model, Like we mock the model in unit testing. Also handler testing interect with the database.

Some point need to keep in mind while creating test case.

1) Always consider only the code / function for what you are writing testcase. 

2) Try to rollback all the operation you have made during the testcase execution.