This is something I posted to the Sitepoint PHP Application Design Forum with a little bit of added background. The background is the idea that unit test methods, for the sake of readability, should test only one single behavior. This may mean several tests for one method under test, since one method may have several [...]
Posts from ‘September, 2008’
Type hints are more useful for scalars than objects
Max Horvath has implemented a library for type hinting scalars. That interests me, since I find that type hinting for objects has limited usefulness. I tried using type hints extensively from an early beta version of PHP 5. I mostly gave up on them for three reasons: They make refactoring harder since you get lots [...]