Enhance Analytics\Reporter to fetch tracking data

[MAILPOET-1815]
This commit is contained in:
Rostislav Wolny
2019-03-07 15:18:14 +01:00
committed by M. Shull
parent f91b89bba5
commit efc5aa5900
5 changed files with 35 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ use Carbon\Carbon;
use Codeception\Stub;
use Codeception\Stub\Expected;
use MailPoet\Settings\SettingsController;
use MailPoet\WooCommerce\Helper as WooCommerceHelper;
class AnalyticsTest extends \MailPoetTest {
@@ -20,7 +21,7 @@ class AnalyticsTest extends \MailPoetTest {
function _before() {
parent::_before();
$this->settings = new SettingsController();
$this->analytics = new Analytics(new Reporter($this->settings), $this->settings);
$this->analytics = new Analytics(new Reporter($this->settings, new WooCommerceHelper), $this->settings);
// Remove premium plugin hooks so that tests pass also with premium active
remove_all_filters(Analytics::ANALYTICS_FILTER);
}