Skip to content

Commit

Permalink
Refs #4087, fix bug in capture.js and allow multiple UI test cases to…
Browse files Browse the repository at this point in the history
… be written.
  • Loading branch information
Benaka Moorthi committed Aug 22, 2013
1 parent 1fe353b commit 8bb5f17
Show file tree
Hide file tree
Showing 39 changed files with 247 additions and 231 deletions.
2 changes: 1 addition & 1 deletion tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
Expand Up @@ -16,7 +16,7 @@
*/
class Test_Piwik_Fixture_ManySitesImportedLogs extends Test_Piwik_BaseFixture
{
public $dateTime = '2010-03-06 11:22:33';
public $dateTime = '2012-08-09 11:22:33';
public $idSite = 1;
public $idSite2 = 2;
public $idGoal = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/AnnotationsTest.php
Expand Up @@ -14,7 +14,7 @@ class AnnotationsTest extends IntegrationTestCase
{
public static $fixture = null;

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'annotations';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/ApiGetReportMetadataTest.php
Expand Up @@ -34,7 +34,7 @@ public function tearDown()
Proxy::getInstance()->setHideIgnoredFunctions(true);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'apiGetReportMetadata';
}
Expand Down
Expand Up @@ -30,7 +30,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'apiGetReportMetadata_year';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/BlobReportLimitingTest.php
Expand Up @@ -153,7 +153,7 @@ public function testApiWithRankingQueryDisabled()
}
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'reportLimiting';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/CsvExportTest.php
Expand Up @@ -57,7 +57,7 @@ public function testApi($api, $params)
$this->runApiTests($api, $params);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'csvExport';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php
Expand Up @@ -174,7 +174,7 @@ public function getApiForTesting()
), self::getApiForTestingScheduledReports($dateTime, 'week'));
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'ecommerceOrderWithItems';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/FlattenReportsTest.php
Expand Up @@ -112,7 +112,7 @@ public function getApiForTesting()
return $return;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'FlattenReports';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/ImportLogsTest.php
Expand Up @@ -69,7 +69,7 @@ public function testDynamicResolverSitesCreated()
$this->assertEquals(1, count($whateverDotCom));
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'ImportLogs';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/LabelFilterTest.php
Expand Up @@ -114,7 +114,7 @@ public function getApiForTesting()
return $return;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'LabelFilter';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/NoVisitTest.php
Expand Up @@ -39,7 +39,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'noVisit';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/NonUnicodeTest.php
Expand Up @@ -40,7 +40,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'NonUnicode';
}
Expand Down
Expand Up @@ -85,7 +85,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'oneVisitor_oneWebsite_severalDays_DateRange';
}
Expand Down
Expand Up @@ -16,7 +16,7 @@ class Test_Piwik_Integration_OneVisitorOneWebsite_SeveralDaysDateRange_Archiving
{
public static $fixture = null; // initialized below test definition

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'oneVisitor_oneWebsite_severalDays_DateRange';
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'OneVisitorTwoVisits_withCookieSupport';
}
Expand Down
Expand Up @@ -39,7 +39,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'OneVisitor_LongUrlsTruncated';
}
Expand Down
Expand Up @@ -37,7 +37,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'OneVisitor_NoKeywordSpecified';
}
Expand Down
Expand Up @@ -93,7 +93,7 @@ public function getApiForTesting()
return $result;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'periodIsRange_dateIsLastN_MetadataAndNormalAPI';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/RowEvolutionTest.php
Expand Up @@ -210,7 +210,7 @@ public function getApiForTesting()
return $return;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'RowEvolution';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/SiteSearchTest.php
Expand Up @@ -81,7 +81,7 @@ public function getApiForTesting()
return $result;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'SiteSearch';
}
Expand Down
Expand Up @@ -34,7 +34,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'PiwikTracker_trackForceUsingVisitId_insteadOfHeuristics_alsoTestsCampaignTracking';
}
Expand Down
Expand Up @@ -52,7 +52,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'trackGoals_allowMultipleConversionsPerVisit';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/TrackerWindowLookBack.php
Expand Up @@ -37,7 +37,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'TrackerWindowLookBack';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/TransitionsTest.php
Expand Up @@ -71,7 +71,7 @@ public function getApiForTesting()
return $return;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'Transitions';
}
Expand Down
Expand Up @@ -102,7 +102,7 @@ public function getApiForTesting()
return array_merge($result, self::getApiForTestingScheduledReports($dateTime, 'month'));
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'TwoVisitors_twoWebsites_differentDays';
}
Expand Down
Expand Up @@ -53,7 +53,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'TwoVisitors_twoWebsites_differentDays_ArchivingDisabled';
}
Expand Down
Expand Up @@ -104,7 +104,7 @@ public function getApiForTesting()
return $result;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'TwoVisitors_twoWebsites_differentDays_Conversions';
}
Expand Down
Expand Up @@ -49,7 +49,7 @@ public function testApi($api, $params)
$this->runApiTests($api, $params);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'twoVisitsWithCustomVariables';
}
Expand Down
Expand Up @@ -13,7 +13,7 @@ class Test_Piwik_Integration_TwoVisitsWithCustomVariables_SegmentContains extend
{
public static $fixture = null; // initialized below class definition

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'twoVisitsWithCustomVariables';
}
Expand Down
Expand Up @@ -38,7 +38,7 @@ public function getApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'twoVisitsWithCustomVariables_segmentMatchALL_noGoalData';
}
Expand Down
Expand Up @@ -70,7 +70,7 @@ public function getSegmentToTest()
return $segment;
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'twoVisitsWithCustomVariables_segmentMatchNONE';
}
Expand Down
Expand Up @@ -96,7 +96,7 @@ public function testCheck()
}
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'twoVisitsWithCustomVariables_segmentMatchVisitorType';
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Integration/UrlNormalizationTest.php
Expand Up @@ -104,7 +104,7 @@ public function testCheckPostConditions()
$this->assertEquals($expected, $urls, "normalization went wrong");
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'UrlNormalization';
}
Expand Down
Expand Up @@ -115,7 +115,7 @@ public function getAnotherApiForTesting()
);
}

public function getOutputPrefix()
public static function getOutputPrefix()
{
return 'VisitsInPast_InvalidateOldReports';
}
Expand Down
6 changes: 3 additions & 3 deletions tests/PHPUnit/IntegrationTestCase.php
Expand Up @@ -941,9 +941,9 @@ public function getApiForTesting()
/**
* Gets the string prefix used in the name of the expected/processed output files.
*/
public function getOutputPrefix()
public static function getOutputPrefix()
{
return str_replace('Test_Piwik_Integration_', '', get_class($this));
return str_replace('Test_Piwik_Integration_', '', get_called_class());
}

protected function _setCallableApi($api)
Expand Down Expand Up @@ -974,7 +974,7 @@ protected function _setCallableApi($api)
*/
protected function runApiTests($api, $params)
{
$testName = 'test_' . $this->getOutputPrefix();
$testName = 'test_' . static::getOutputPrefix();
$this->missingExpectedFiles = array();
$this->comparisonFailures = array();

Expand Down

0 comments on commit 8bb5f17

Please sign in to comment.