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

MockEventDispatcher.php « PHPUnit « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7026df5721c33a65f9f77a78f5b4a50de01b494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
class MockEventDispatcher extends Event_Dispatcher
{
	private $forcedNotificationObject = false;

	function __construct($forcedNotificationObject) {
		$this->forcedNotificationObject = $forcedNotificationObject;
	}

	function &postNotification(&$notification, $pending = true, $bubble = true)
	{
		$notification->_notificationObject = $this->forcedNotificationObject;

		return $notification;
	}
}