I'm finally starting out with unit testing, having known that I should be doing it for a while, but I have a few questions:
- Should or shouldn't I retest parent classes when testing the children if no methods have been overwritten?
- Conceptually, how do you test the submitted part of a form? I'm using PHP. (Edit: The reason I ask this is that I have a high level form class that generates a form, validates it, filters it, and generates any error messages by taking a JSON-like array as input and delegating to a variety of smaller classes. However, I can't test the errors, etc without submitting the form. Edit: This looks like it might be an answer.)
- If you have optional parameter in a method, should you write a test for both when they are present and when they are not?
- Should unit testing in any way be combined with testing code execution time or should they remain completely separate?
- Is there any valid reason not to run your full test suite every time?
- Just so I'm getting my terminology right, to what does the unit in unit testing refer? The class being tested? The method? The parameter? Something else?