All Questions
3 questions
-2
votes
1
answer
504
views
What are the best practices for writing a long, multi-step process? [closed]
When writing a long process, i.e. one filled with many steps of business logic, what are the best practices for organising it? There are a few different options here that I can see:
Just write a long ...
5
votes
3
answers
481
views
When testing is it OK to use a method of the subject to test another method of the subject?
I have two methods in the same helper class one that creates an image (createImage) and one that compares two images (compareImages).
Image createImage(Data data);
Boolean compareImages(Image from, ...
3
votes
2
answers
3k
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
$...