Merge pull request #19706 from civicrm/5.35
[civicrm-core.git] / Civi / Test / CiviTestListener.php
index 2851bda3d89c9d283186e3dd54beeee9f104b327..af5c2cc2680a1bf8ff2bfc410cfb1d322cc9b789 100644 (file)
@@ -25,10 +25,6 @@ else {
    * @see HookInterface
    */
   class CiviTestListener extends \PHPUnit\Framework\BaseTestListener {
-    /**
-     * @var \CRM_Core_TemporaryErrorScope
-     */
-    private $errorScope;
 
     /**
      * @var array
@@ -55,7 +51,6 @@ else {
     public function startTest(\PHPUnit\Framework\Test $test) {
       if ($this->isCiviTest($test)) {
         error_reporting(E_ALL);
-        $this->errorScope = \CRM_Core_TemporaryErrorScope::useException();
       }
 
       if ($test instanceof HeadlessInterface) {
@@ -85,6 +80,7 @@ else {
       if ($test instanceof HookInterface) {
         \CRM_Utils_Hook::singleton()->reset();
       }
+      \CRM_Utils_Time::resetTime();
       if ($this->isCiviTest($test)) {
         error_reporting(E_ALL & ~E_NOTICE);
         $this->errorScope = NULL;