PHPUnit getResults broken?

Hi,

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:

[indent]

try {

assertion1,2,3…etc

} 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);

[/indent]

Problem is, getResult() is returning NULL.

The documentation is really limited in this regard.

Any help would be greatly appreciated,

thanks.