قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-22 15:07:44 +00:00

* [Coding Style] Enable rule PSR12.Files.FileHeader * Apply CS * Replace Piwik with Matomo in file headers * Unify file headers (position, no. of lines, https links) * Rebuild dist files * Apply CS * Fix system test that relies on line numbers in a file that had the file header updated --------- Co-authored-by: Stefan Giehl <stefan@matomo.org>
45 خطوط
1.4 KiB
PHP
45 خطوط
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Matomo - free/libre analytics platform
|
|
*
|
|
* @link https://matomo.org
|
|
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
|
*/
|
|
|
|
namespace Piwik\Plugins\ScheduledReports\tests\Fixtures;
|
|
|
|
use Piwik\Common;
|
|
use Piwik\Db;
|
|
use Piwik\Plugins\ScheduledReports\API;
|
|
use Piwik\Plugins\ScheduledReports\ScheduledReports;
|
|
use Piwik\Tests\Framework\Fixture;
|
|
|
|
class ReportSubscription extends Fixture
|
|
{
|
|
public $dateTime = '2013-01-23 01:23:45';
|
|
public $idSite = 1;
|
|
|
|
public function setUp(): void
|
|
{
|
|
if (!Fixture::siteCreated(1)) {
|
|
Fixture::createWebsite('2012-01-01 00:00:00');
|
|
}
|
|
|
|
Fixture::createSuperUser(false);
|
|
|
|
$reportType = 'email';
|
|
$reportFormat = 'pdf';
|
|
$reports = array('VisitsSummary_get', 'UserCountry_getCountry');
|
|
$parameters = [
|
|
ScheduledReports::DISPLAY_FORMAT_PARAMETER => ScheduledReports::DISPLAY_FORMAT_TABLES_ONLY,
|
|
ScheduledReports::EMAIL_ME_PARAMETER => true,
|
|
ScheduledReports::ADDITIONAL_EMAILS_PARAMETER => ['any@matomo.org']
|
|
];
|
|
|
|
API::getInstance()->addReport($this->idSite, 'description', 'day', 3, $reportType, $reportFormat, $reports, $parameters);
|
|
|
|
Db::query("INSERT INTO " . Common::prefixTable('report_subscriptions') . "(idreport, token, email) VALUES (1, 'mycustomtoken', 'any@matomo.org')");
|
|
}
|
|
}
|