exceptions.php
public function isExpected($test, $exception)
    {
        if ($this->expected) {
            return $test->assert($this->expected, $exception, $this->message);
        }
        foreach ($this->ignored as $ignored) {
            if ($ignored->test($exception)) {
                return true;
            }
        }

        return false;
    }
public function isExpected($test, $exception)
    {
        if ($this->expected) {
            return $test->assert($this->expected, $exception, $this->message);
        }
        foreach ($this->ignored as $ignored) {
            if ($ignored->test($exception)) {
                return true;
            }
        }

        return false;
    }
Compares the expected exception with any in the queue.
Issues a pass or fail and returns the state of the test.

@param SimpleTestCase $test    Test case to send messages to.
@param Exception $exception    Exception to compare.

@return bool                False on no match.