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

Use Http::sendHttpRequest instead of file_get_contents in ArchiveWebTest.

parent 715cff5e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,6 +7,7 @@
*/
use Piwik\Option;
use Piwik\Http;
/**
* Tests to call the archive.php script via web and check there is no error,
......@@ -31,10 +32,8 @@ class Test_Piwik_Integration_ArchiveWebTest extends IntegrationTestCase
$urlTmp = Option::get('piwikUrl');
Option::set('piwikUrl', $host . 'tests/PHPUnit/proxy/index.php');
$streamContext = stream_context_create(array('http' => array('timeout' => 600)));
$url = $host . 'tests/PHPUnit/proxy/archive.php?token_auth=' . $token . '&forcelogtoscreen=1';
$output = file_get_contents($url, 0, $streamContext);
$output = Http::sendHttpRequest($url, 600);
// ignore random build issues
if (empty($output) || strpos($output, \Piwik\CronArchive::NO_ERROR) === false) {
......
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