Permalink
Browse files

Add PHPUnit_Framework_TestCase::setTestResultObject().

  • Loading branch information...
1 parent f44f925 commit cd4cea92cfb760fbcc713cfbbb56ad6aa05da448 @sebastianbergmann committed Oct 7, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 PHPUnit/Framework/TestCase.php
@@ -642,8 +642,7 @@ public function run(PHPUnit_Framework_TestResult $result = NULL)
$result = $this->createResult();
}
- $this->result = $result;
-
+ $this->setTestResultObject($result);
$this->setExpectedExceptionFromAnnotation();
$this->setUseErrorHandlerFromAnnotation();
$this->setUseOutputBufferingFromAnnotation();
@@ -1122,6 +1121,15 @@ public function getTestResultObject()
}
/**
+ * @param PHPUnit_Framework_TestResult $result
+ * @since Method available since Release 3.6.0
+ */
+ public function setTestResultObject(PHPUnit_Framework_TestResult $result)
+ {
+ $this->result = $result;
+ }
+
+ /**
* This method is a wrapper for the ini_set() function that automatically
* resets the modified php.ini setting to its original value after the
* test is run.

0 comments on commit cd4cea9

Please sign in to comment.