本文整理汇总了PHP中Piwik\Tests\Framework\Fixture::siteCreated方法的典型用法代码示例。如果您正苦于以下问题:PHP Fixture::siteCreated方法的具体用法?PHP Fixture::siteCreated怎么用?PHP Fixture::siteCreated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Tests\Framework\Fixture
的用法示例。
在下文中一共展示了Fixture::siteCreated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated($this->idSite)) {
Fixture::createWebsite('2014-01-01 00:00:00');
}
}
示例2: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated(1)) {
Fixture::createWebsite('2015-01-01 00:00:00');
}
$this->channels = new Plugin\ReleaseChannels(StaticContainer::get('Piwik\\Plugin\\Manager'));
}
示例3: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated($this->idSite)) {
Fixture::createWebsite('2014-01-01 00:00:00');
}
$this->settings = new UserSettings(new SystemSettings());
}
示例4: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated($this->idSite)) {
Fixture::createWebsite('2010-00-00 00:00:00');
}
$this->dao = new RawLogDao();
}
示例5: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated(1)) {
Fixture::createWebsite('2014-01-01 00:00:00');
}
$this->index = new Index();
}
示例6: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated($this->idSite)) {
Fixture::createWebsite('2015-01-01 00:00:00');
}
$this->storage = $this->createStorage();
$this->setting = $this->createSetting('test');
}
示例7: setUp
public function setUp()
{
parent::setUp();
$idSite = 1;
$dateTime = '2014-01-01 00:00:01';
if (!Fixture::siteCreated($idSite)) {
Fixture::createWebsite($dateTime);
}
$this->tracker = Fixture::getTracker($idSite, $dateTime, $defaultInit = true);
}
示例8: setUp
public function setUp()
{
parent::setUp();
$this->api = API::getInstance();
Fixture::createSuperUser();
if (!Fixture::siteCreated(1)) {
Fixture::createWebsite('2012-01-01 00:00:00');
}
$this->setSuperUser();
}
示例9: setUp
public function setUp()
{
parent::setUp();
Plugin\Manager::getInstance()->activatePlugin('MobileAppMeasurable');
if (!Fixture::siteCreated($this->idSite)) {
$type = MobileAppType::ID;
Fixture::createWebsite('2015-01-01 00:00:00', $ecommerce = 0, $siteName = false, $siteUrl = false, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $timezone = null, $type);
}
$this->measurable = new Measurable($this->idSite);
}
示例10: setUp
public function setUp()
{
parent::setUp();
foreach (array(1, 2) as $idSite) {
if (!Fixture::siteCreated($idSite)) {
Fixture::createWebsite('2012-01-01 00:00:00');
}
}
$this->plugin = new CustomDimensions();
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->api = API::getInstance();
Fixture::createSuperUser(true);
if (!Fixture::siteCreated(1)) {
Fixture::createWebsite('2012-01-01 00:00:00');
}
$this->makeSureTestRunsInContextOfAnonymousUser();
}
示例12: setUp
public function setUp()
{
parent::setUp();
$idSite = 1;
if (!Fixture::siteCreated($idSite)) {
Fixture::createWebsite('2014-01-01 00:00:00');
}
$site = new Site($idSite);
$date = Date::factory('2012-01-01');
$period = Period\Factory::build('month', $date);
$segment = new Segment('', array($site->getId()));
$params = new Parameters($site, $period, $segment);
$this->logAggregator = new LogAggregator($params);
}
示例13: setUp
public function setUp()
{
parent::setUp();
if (!Fixture::siteCreated(1)) {
Fixture::createWebsite('2012-01-01 00:00:00');
}
if (!Fixture::siteCreated(2)) {
Fixture::createWebsite('2012-01-01 00:00:00');
}
Cache::clearCacheGeneral();
Cache::deleteCacheWebsiteAttributes($idSite = 1);
Cache::deleteCacheWebsiteAttributes($idSite = 2);
$this->processor = new Processor();
}
示例14: test_getServerVisitCustomVariables_shouldReturnSystemReport
public function test_getServerVisitCustomVariables_shouldReturnSystemReport()
{
FakeAccess::clearAccess($superUser = true);
for ($i = 1; $i < 15; $i++) {
if (!Fixture::siteCreated($i)) {
Fixture::createWebsite('2014-01-01 00:00:00');
}
}
for ($i = 1; $i < 9; $i++) {
UsersApi::getInstance()->addUser($login = 'test' . $i, 'password0815', "lorem{$i}@piwik.org");
}
for ($i = 1; $i < 5; $i++) {
SegmentApi::getInstance()->add('Segment' . $i, 'pageUrl%3D@inde');
}
$customVars = array(array('id' => 1, 'name' => 'Piwik Version', 'value' => '2.14.3'), array('id' => 2, 'name' => 'PHP Version', 'value' => '5.5.27'), array('id' => 3, 'name' => 'Num Users', 'value' => 8), array('id' => 4, 'name' => 'Num Websites', 'value' => 14), array('id' => 5, 'name' => 'Num Segments', 'value' => 4), array('id' => 6, 'name' => 'MySQL Version', 'value' => Db::get()->getServerVersion()));
$this->assertSame($customVars, $this->customVars->getServerVisitCustomVariables());
}
示例15: setUp
public function setUp()
{
parent::setUp();
if (!IntegrationTestCase::isRedisAvailable()) {
$this->markTestSkipped('Redis extension is not installed, skipping test');
}
if (self::isTravisCI() && self::isPhpVersion53()) {
$this->markTestSkipped('Redis seems to be not enabled in nginx on Travis + PHP 5.3.3');
}
self::$fixture->performSetup();
$idSite = 1;
$dateTime = '2014-01-01 00:00:01';
if (!Fixture::siteCreated($idSite)) {
Fixture::createWebsite($dateTime);
}
$queuedTracking = new QueuedTracking();
$this->tracker = Fixture::getTracker($idSite, $dateTime, $defaultInit = true);
$this->enableQueue();
}