public function run(array $options = array())
{
$defaults = array('methods' => $this->methods(), 'reporter' => $this->_reporter, 'handler' => function ($code, $message, $file = null, $line = null) {
if (error_reporting() & $code) {
throw new ErrorException($message, 0, $code, $file, $line);
}
});
$options += $defaults;
$this->_results = array();
$this->_reporter = $options['reporter'];
try {
$this->skip();
} catch (Exception $e) {
$this->_handleException($e);
return $this->_results;
}
set_error_handler($options['handler']);
foreach ($options['methods'] as $method) {
if ($this->_runTestMethod($method, $options) === false) {
break;
}
}
restore_error_handler();
return $this->_results;
}