コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     // tests run in UTC, the Tracker in UTC
     $this->dateTime = '2010-03-06 11:22:33';
     $this->idSite = $this->createWebsite($this->dateTime);
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     // Create 2 websites
     $this->idSite = $this->createWebsite($this->dateTimeFirstDateWebsite1);
     $this->idSite2 = $this->createWebsite($this->dateTimeFirstDateWebsite2);
 }
コード例 #3
0
ファイル: ImportLogs.test.php プロジェクト: nnnnathann/piwik
 public function setUp()
 {
     parent::setUp();
     $this->idSite = $this->createWebsite($this->dateTime);
     // for conversion testing
     $this->idGoal = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'all', 'url', 'http', 'contains', false, 5);
 }
コード例 #4
0
 public function setUp()
 {
     parent::setUp();
     // tests run in UTC, the Tracker in UTC
     $this->idSite = $this->createWebsite($this->dateTime);
     $this->idGoal1 = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'triggered js', 'manually', '', '');
     $this->idGoal2 = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'second goal', 'manually', '', '');
 }
コード例 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->idSite = $this->createWebsite($this->dateTime, $ecommerce = 1);
     $this->idGoal = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'Goal 1 - Thank you', 'title', 'Thank you', 'contains', $caseSensitive = false, $revenue = 10, $allowMultipleConversions = 1);
     $this->idGoal2 = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'Goal 2 - Hello', 'url', 'hellow', 'contains', $caseSensitive = false, $revenue = 10, $allowMultipleConversions = 0);
     $this->idGoal3 = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'triggered js', 'manually', '', '');
 }
コード例 #6
0
 public function setUp()
 {
     parent::setUp();
     $this->dateTime = '2011-04-05 00:11:42';
     $this->idSite = $this->createWebsite($this->dateTime, $ecommerce = 1);
     $this->idSite2 = $this->createWebsite($this->dateTime);
     $this->idGoalStandard = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'title match, triggered ONCE', 'title', 'incredible', 'contains', $caseSensitive = false, $revenue = 10, $allowMultipleConversions = true);
 }
 public function setUp()
 {
     parent::setUp();
     // tests run in UTC, the Tracker in UTC
     $this->dateTime = '2010-01-03 11:22:33';
     $ecommerce = $this->allowConversions ? 1 : 0;
     $this->idSite1 = $this->createWebsite($this->dateTime, $ecommerce, "Site 1");
     $this->idSite2 = $this->createWebsite($this->dateTime, 0, "Site 2");
 }
 public function test_RunAllTests()
 {
     $idSite = $this->idSite;
     parent::test_RunAllTests();
     // test delete is working as expected
     $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
     $this->assertTrue(2 == count($goals));
     Piwik_Goals_API::getInstance()->deleteGoal($idSite, $this->idGoal_OneConversionPerVisit);
     Piwik_Goals_API::getInstance()->deleteGoal($idSite, $this->idGoal_MultipleConversionPerVisit);
     $goals = Piwik_Goals_API::getInstance()->getGoals($idSite);
     $this->assertTrue(empty($goals));
 }
コード例 #9
0
 public function test_RunAllTests()
 {
     parent::test_RunAllTests();
     $sql = "SELECT count(*) FROM " . Piwik_Common::prefixTable('log_action');
     $count = Zend_Registry::get('db')->fetchOne($sql);
     $expected = 9;
     // 4 urls + 5 titles
     $this->assertEqual($expected, $count, "only {$expected} actions expected");
     $sql = "SELECT name, url_prefix FROM " . Piwik_Common::prefixTable('log_action') . " WHERE type = " . Piwik_Tracker_Action::TYPE_ACTION_URL . " ORDER BY idaction ASC";
     $urls = Zend_Registry::get('db')->fetchAll($sql);
     $expected = array(array('name' => 'example.org/foo/bar.html', 'url_prefix' => 0), array('name' => 'example.org/foo/bar2.html', 'url_prefix' => 3), array('name' => 'example.org/foo/bar3.html', 'url_prefix' => 1), array('name' => 'example.org/foo/bar4.html', 'url_prefix' => 2));
     $this->assertEqual($expected, $urls, "normalization went wrong");
 }
コード例 #10
0
ファイル: LabelFilter.test.php プロジェクト: nnnnathann/piwik
 public function setUp()
 {
     parent::setUp();
     $this->idSite = $this->createWebsite($this->dateTime);
 }
コード例 #11
0
 public function setUp()
 {
     parent::setUp();
     $this->idSite = $this->createWebsite('2010-02-01 11:22:33');
 }
コード例 #12
0
ファイル: NoVisit.test.php プロジェクト: nnnnathann/piwik
 public function setUp()
 {
     parent::setUp();
     $this->dateTime = '2009-01-04 00:11:42';
     $this->idSite = $this->createWebsite($this->dateTime);
 }
 public function setUp()
 {
     parent::setUp();
     $this->idSite = $this->createWebsite($this->dateTime);
     $this->idGoal = Piwik_Goals_API::getInstance()->addGoal($this->idSite, 'triggered js', 'manually', '', '');
 }