Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")
require_once('classes/controllers/FrontDispatcher.inc');
$dispatcher= new FrontDispatcher();
$dispatcher->addModule("SlidingDoorsAdmin","|register/[-A-Za-z0-9_]*/admin|");
$view = $dispatcher->dispatch($_SERVER["REQUEST_URI"]);
if (0!=$view) {
echo $view;
exit;
}
/** Fall back to the legacy, pure scripts */
require_once($_SERVER["REQUEST_URI"]);
exit;
Its simple, so I can almost say "I don't need no unit-tests" and trust that it'll get well exercised via the integration/web-tests. But that feels a little bit like laziness/lack of creativity. And its problably still buggy as it hasn't been written with TDD and it hasn't been hooked up to the webserver for ithose integration tests....
nielsene wrote:Its simple, so I can almost say "I don't need no unit-tests" and trust that it'll get well exercised via the integration/web-tests. But that feels a little bit like laziness/lack of creativity.
I think you could indeed just leave it to the web test. There's very little to go wrong there.
nielsene wrote:Its simple, so I can almost say "I don't need no unit-tests" and trust that it'll get well exercised via the integration/web-tests. But that feels a little bit like laziness/lack of creativity.
I think you could indeed just leave it to the web test. There's very little to go wrong there.
OK, I think I will then. Especially as I couldn't get the output buffering to work (because unless I can mock the dispatcher it just turns into an integration test anyways as it has to run through the whole system.)