예제 #1
0
/**
* Runs the test case and collects the results in a TestResult object.
* If no TestResult object is passed a new one will be created.
* This method is run for each test method in this class
*
* @param  PHPUnit_Framework_TestResult $result
* @return PHPUnit_Framework_TestResult
* @throws InvalidArgumentException
*/
	public function run(PHPUnit_Framework_TestResult $result = NULL) {
		if (!empty($this->fixtureManager)) {
			$this->fixtureManager->load($this);
		}
		$result = parent::run($result);
		if (!empty($this->fixtureManager)) {
			$this->fixtureManager->unload($this);
		}
		return $result;
	}
 /**
  * Not Implemented
  *
  * @param PHPUnit_Framework_Test $test
  * @param float $time
  * @return void
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if ($test instanceof CakeTestCase) {
         $this->_fixtureManager->unload($test);
     }
 }