2
votes
2answers
163 views

Mock up class object

For example I have class ItemDownloader which has method downloadItem. This method creates instance of another class - Download to perform actual downloading. Question is: I want to test ...
2
votes
2answers
212 views

Returning a mock object from a mock object

I'm trying to return an object when mocking a parser class. This is the test code using PHPUnit 3.7 //set up the result object that I want to be returned from the call to parse method ...