TestCase::setExpectedError
Tells the unit tests that a method or action you are about to attempt is expected to result in JError::raiseSomething being called.
If you don't call this method first, the test will fail. If you call this method during your test and the error does not occur, then your test will also fail because we assume you were testing to see that an error did occur when it was supposed to. If passed without argument, the array is initialized if it hsn't been already
Signature
public function setExpectedError([mixed
$error = null] )
Parameters
-
$error
- The JException object to expect.
Returns
- void