Skip to content
Extraits de code Groupes Projets
Valider abe87d23 rédigé par JulienMoumne's avatar JulienMoumne
Parcourir les fichiers

refs #3323 follow best practices per comment:6:ticket:3323

git-svn-id: http://dev.piwik.org/svn/trunk@6936 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 9bb31c79
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -22,6 +22,7 @@ class Test_Piwik_Integration_EcommerceOrderWithItems extends IntegrationTestCase
parent::setUpBeforeClass();
try {
self::setUpWebsitesAndGoals();
self::setUpScheduledReports(self::$idSite);
self::trackVisits();
} catch(Exception $e) {
// Skip whole test suite if an error occurs while setup
......@@ -29,9 +30,13 @@ class Test_Piwik_Integration_EcommerceOrderWithItems extends IntegrationTestCase
}
}
public function testSetUpScheduledReports()
/**
* @group Integration
* @group EcommerceOrderWithItems
*/
public function testImagesIncludedInTests()
{
$this->setUpScheduledReports(self::$idSite);
$this->alertWhenImagesExcludedFromTests();
}
/**
......
......@@ -30,6 +30,7 @@ class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays extends Integ
parent::setUpBeforeClass();
try {
self::setUpWebsitesAndGoals();
self::setUpScheduledReports(self::$idSite1);
self::trackVisits();
} catch(Exception $e) {
// Skip whole test suite if an error occurs while setup
......@@ -37,9 +38,13 @@ class Test_Piwik_Integration_TwoVisitors_TwoWebsites_DifferentDays extends Integ
}
}
public function testSetUpScheduledReports()
/**
* @group Integration
* @group TwoVisitors_TwoWebsites_DifferentDays
*/
public function testImagesIncludedInTests()
{
$this->setUpScheduledReports(self::$idSite1);
$this->alertWhenImagesExcludedFromTests();
}
/**
......
......@@ -246,7 +246,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
* @see canImagesBeIncludedInScheduledReports
* @param int $idSite id of website created
*/
protected function setUpScheduledReports($idSite)
protected static function setUpScheduledReports($idSite)
{
$includeImages = self::canImagesBeIncludedInScheduledReports();
......@@ -297,13 +297,16 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
array("MultiSites_getAll"),
array("phoneNumbers"=>array())
);
}
if(!$includeImages)
protected function alertWhenImagesExcludedFromTests()
{
if(!self::canImagesBeIncludedInScheduledReports())
{
$this->markTestSkipped(
'Do take note that scheduled reports are not being tested with images. ' .
'If images contained in scheduled reports have been altered, tests will fail on the Piwik QA Server. ' .
'To include images in the test suite, please use a machine with the following specifications :' // TODO update with new Piwik QA Server
'If images contained in scheduled reports have been altered, tests will fail on the Piwik QA Server. ' .
'To include images in the test suite, please use a machine with the following specifications :' // TODO update with new Piwik QA Server
);
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter