Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/EventDispatcher.php10
-rw-r--r--tests/PHPUnit/Fixture.php2
2 files changed, 10 insertions, 2 deletions
diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php
index b884505177..9b4af816da 100644
--- a/core/EventDispatcher.php
+++ b/core/EventDispatcher.php
@@ -126,7 +126,7 @@ class EventDispatcher extends Singleton
}
/**
- * Removes all registered observers for an event name. Only used for testing.
+ * Removes all registered extra observers for an event name. Only used for testing.
*
* @param string $eventName
*/
@@ -136,6 +136,14 @@ class EventDispatcher extends Singleton
}
/**
+ * Removes all registered extra observers. Only used for testing.
+ */
+ public function clearAllObservers()
+ {
+ $this->extraObservers = array();
+ }
+
+ /**
* Re-posts all pending events to the given plugin.
*
* @param Plugin $plugin
diff --git a/tests/PHPUnit/Fixture.php b/tests/PHPUnit/Fixture.php
index 23938a43c6..ffaeca3571 100644
--- a/tests/PHPUnit/Fixture.php
+++ b/tests/PHPUnit/Fixture.php
@@ -231,7 +231,7 @@ class Fixture extends PHPUnit_Framework_Assert
ArchiveTableCreator::clear();
\Piwik\Plugins\ScheduledReports\API::$cache = array();
\Piwik\Registry::unsetInstance();
- \Piwik\EventDispatcher::getInstance()->clearObservers();
+ \Piwik\EventDispatcher::getInstance()->clearAllObservers();
$_GET = $_REQUEST = array();
Translate::unloadEnglishTranslation();