public function __construct($title = '')
 {
     parent::__construct($title);
     $this->width = 1111;
     $this->height = 222;
     $this->doExtraQuoteTests = false;
 }
 public function test_RunAllTests()
 {
     if (date('G') == 23 || date('G') == 22) {
         echo "SKIPPED test_periodIsRange_dateIsLastN_MetadataAndNormalAPI() since it fails around midnight...";
         $this->pass();
         return;
     }
     parent::test_RunAllTests();
 }
 public function test_RunAllTests()
 {
     parent::test_RunAllTests();
     // ----------------------------------------------
     // Implementation Checks
     // ----------------------------------------------
     // Verify that, when a segment is specified, only the requested report is processed
     // In this case, check that only the Custom Variables blobs have been processed
     if (Test_Integration::$apiTestingLevel != Test_Integration::NO_API_TESTING) {
         $tests = array('archive_blob_2010_01' => 28, 'archive_numeric_2010_01' => 138, 'archive_blob_2009_12' => 28, 'archive_numeric_2009_12' => (6 + 2 + 3) * 2);
         foreach ($tests as $table => $expectedRows) {
             $sql = "SELECT count(*) FROM " . Piwik_Common::prefixTable($table);
             $countBlobs = Zend_Registry::get('db')->fetchOne($sql);
             $this->assertEqual($expectedRows, $countBlobs, "{$table}: %s");
         }
     }
 }
 */
/**
 * Tests w/ two visits & custom variables.
 */
class Test_Piwik_Integration_TwoVisitsWithCustomVariables extends IntegrationTestCase
{
    public static $fixture = null;
    // initialized below class definition
    public function getApiForTesting()
    {
        $idSite = self::$fixture->idSite;
        $dateTime = self::$fixture->dateTime;
        $apiToCall = array('VisitsSummary.get', 'CustomVariables.getCustomVariables');
        $return = array(array($apiToCall, array('idSite' => 'all', 'date' => $dateTime, 'periods' => array('day', 'week'), 'setDateLastN' => true)), array('API.getProcessedReport', array('idSite' => $idSite, 'date' => $dateTime, 'periods' => 'day', 'apiModule' => 'CustomVariables', 'apiAction' => 'getCustomVariablesValuesFromNameId', 'supertableApi' => 'CustomVariables.getCustomVariables', 'testSuffix' => '__subtable')));
        return $return;
    }
    /**
     * @dataProvider getApiForTesting
     * @group        Integration
     */
    public function testApi($api, $params)
    {
        $this->runApiTests($api, $params);
    }
    public static function getOutputPrefix()
    {
        return 'twoVisitsWithCustomVariables';
    }
}
Test_Piwik_Integration_TwoVisitsWithCustomVariables::$fixture = new Test_Piwik_Fixture_TwoVisitsWithCustomVariables();
 public function test_RunAllTests()
 {
     // get the segment used & make sure to do some extra tests before testing the API
     $this->getSegmentToTest(true);
     parent::test_RunAllTests();
 }
Example #6
0
 public function __construct($testName = '')
 {
     parent::__construct($testName);
     $this->useEscapedQuotes = false;
     $this->doExtraQuoteTests = false;
 }
 public function __construct($title = '')
 {
     parent::__construct($title);
     $this->doExtraQuoteTests = false;
 }
 public function __construct($title = '')
 {
     parent::__construct($title);
     $this->width = 1111;
     $this->height = 222;
 }