Skip to content
Extraits de code Groupes Projets
Valider 11f0953b rédigé par mattab's avatar mattab
Parcourir les fichiers

Enable Scheduled reports with images, on PHP 5.4 (my box & travis) rather than 5.3

parent 3394d978
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -22,6 +22,10 @@
*/
abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert
{
const IMAGES_GENERATED_ONLY_FOR_OS = 'linux';
const IMAGES_GENERATED_FOR_PHP = '5.4.13';
const IMAGES_GENERATED_FOR_GD = '2.0';
/** Adds data to Piwik. Creates sites, tracks visits, imports log files, etc. */
public abstract function setUp();
......@@ -259,9 +263,9 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert
{
$gdInfo = gd_info();
return
(stristr(php_uname(), 'precise32') || stristr(php_uname(), 'ubuntu')) &&
stristr(phpversion(), '5.3.10') &&
$gdInfo['GD Version'] == '2.0';
(stristr(php_uname(), self::IMAGES_GENERATED_ONLY_FOR_OS)) &&
stristr(phpversion(), self::IMAGES_GENERATED_FOR_PHP) &&
$gdInfo['GD Version'] == self::IMAGES_GENERATED_FOR_GD;
}
public static $geoIpDbUrl = 'http://piwik-team.s3.amazonaws.com/GeoIP.dat.gz';
......
Impossible d'afficher diff de source : il est trop volumineux. Options pour résoudre ce problème : voir le blob.
......@@ -264,8 +264,8 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
'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 : ' .
'OS = Linux precise32, PHP Version = 5.3.10 and GD Version = 2.0' .
"\n Ignore this message if you're running on your dev machine, but pay attention when it comes from Jenkins."
'OS = '.Test_Piwik_BaseFixture::IMAGES_GENERATED_ONLY_FOR_OS.', PHP Version = '.Test_Piwik_BaseFixture::IMAGES_GENERATED_FOR_PHP.' and GD Version = ' . Test_Piwik_BaseFixture::IMAGES_GENERATED_FOR_GD
. "\n Ignore this message if you're running on your dev machine, but pay attention when it comes from the CI 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