|
Posted by Jerry Stuckle on June 25, 2008, 6:22 pm
Please log in for more thread options HappyCamper wrote:
> I am trying to be a good boy and write a test for every method I'm
> writing. However, exit() is of course interrupting my test as I want
> all of my tests to be on one page. I can't just place it last as I
> have more then a few exit()s.
>
> Please don't recommend using some great open source unit testing
> framework as I really want to write my own.
>
> Does anyone have any ideas? Is there a way to bypass exit or keep it
> confined to a scope or something?
>
Nope. exit() is doing exactly what it's supposed to do.
But why are you calling exit() so much? I seldom call it - most often
after a header() redirect. Otherwise I use conditionals to structure my
code.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|