Hi everyone,
I'm fixing automated test-'testCreateIncidentFromBugReport()' for error-reporting-server and need a little help with 'Mock Objects'.
See L#263 [0]. Because of 'will($this->returnValue(true))' there, 'Incident:save()' method of the mock object returns 'true' inside 'Incident::createIncidentFromBugReport()' (called at [3]).
Now, I want to make 'save()' method of the mock object to do initialization of '$this' (incident object on which it operates). It is necessary because 'Incident::createIncidentFromBugReport()' is designed to return array of ids of newly created incidents [1]. Currently '$this' is not initialized and that's why '$this->id' is 'bool(false)' [2] in the log.
How can that be done?? Is there any method like 'returnValue()' to achieve that??
Thanks,
Dhananjay Nakrani.