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

ManySites.php « Fixtures « tests « SitesManager « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a4a25fc0d7615c72f18ec03516fe5613c3c0b4c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
namespace Piwik\Plugins\SitesManager\tests\Fixtures;

use Piwik\Plugin;
use Piwik\Plugins\MobileAppMeasurable;
use Piwik\Plugins\WebsiteMeasurable;
use Piwik\Tests\Framework\Fixture;

/**
 * Track actions with bandwidth
 */
class ManySites extends Fixture
{
    public $dateTime = '2010-01-03 11:22:33';

    public function setUp(): void
    {
        for ($idSite = 1; $idSite < 64; $idSite++) {
            if (!self::siteCreated($idSite)) {
                if ($idSite < 35) {
                    $siteName = 'SiteTest' . $idSite; // we generate different site names to be used in search
                } else {
                    $siteName = 'Site ' . $idSite;
                }

                $type = null;
                if ($idSite === 2) {
                    $type = MobileAppMeasurable\Type::ID;
                }

                self::createWebsite($this->dateTime, $ecommerce = 0, $siteName,
                                    $siteUrl = false,
                                    $siteSearch = 1, $searchKeywordParameters = null,
                                    $searchCategoryParameters = null, $timezone = null, $type);
            }
        }
    }

}