/** * Runs the tests and collects their result in a TestResult. * * @param PHPUnit_Framework_TestResult $result A test result. * @param mixed $filter The filter passed to each test. * * @return PHPUnit_Framework_TestResult */ public function run(PHPUnit_Framework_TestResult $result = null, $filter = false) { spl_autoload_register(array('SQLI_CodeSniffer', 'autoload')); $result = parent::run($result, $filter); spl_autoload_unregister(array('SQLI_CodeSniffer', 'autoload')); return $result; }