示例#1
0
 /**
  * After each test, perform ehough_mockery_Mockery verification tasks and cleanup the
  * statically stored ehough_mockery_Mockery container for the next test.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     try {
         $container = ehough_mockery_Mockery::getContainer();
         if ($container != null) {
             $expectation_count = $container->mockery_getExpectationCount();
             $test->addToAssertionCount($expectation_count);
         }
         ehough_mockery_Mockery::close();
     } catch (Exception $e) {
         $result = $test->getTestResultObject();
         $result->addError($test, $e, $time);
     }
 }