PHPUnit getResults broken?


I would love to have access to the PHPUnit_Framework_TestResult so as to make the output displayed when running my custon assertions prettier, instead of interrupting the output stream with echo’s.

ideally something like this:


try {


} catch (PHPUnit_Framework_AssertionFailedError $e) {

            $result = $this->getResult();

            $err = "\n" . $this->dressed_message("::$aliasname:: fixture template failed with phpunit exception." . $e);                

            $result->addFailure($this, $e);


Problem is, getResult() is returning NULL.

The documentation is really limited in this regard.

Any help would be greatly appreciated,