I'm using die to stop the process when I get an error:
main class:
class myClass {
public function myMethod () {
$helper->checkParameter( $thisParameterCanNotBeEmpty );
}
}
and my helper
class control {
public function checkParameter ( $param ) {
if ( $param == "" ) {
echo "parameter can not be empty";
die;
}
}
}
like that if the parameter is empty I have an error message and the process is stopped.
But my problem is now I want to use unit tests (with PHPUnit) and the die stop the process (ok) and the unit tests execution (not ok).
With Zend 1.12, is it possible to stop the process with calling view or something instead of kill all the php process ?
Thx