Possible duplicate:
How do you use PHPUnit to test a function if that function should kill PHP?
I am writing some unit tests. The system I'm testing is an MVC web application.
If we want to display pages without a site system, we traditionally run our code, as usual, but print "die ();" expression at the end of the function to exit to the rest of the website.
Now that we add unit testing, this seems like a problem. You see when you are DIE (); in MVC, which seems to send the same message in PHPUnit.
Grrrr ... code now appears as "unstable"
Or that?
How to plan a stamp (); In PHPUnit?
I know about adding this before the test:
but this does not allow me to check the variables as they were "at the time of death" (at least I don't think so)
Can anyone enlighten me?
Thanks! : D
source share