Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2014-12-22 11:21:10 +0300
committerdiosmosis <benaka@piwik.pro>2014-12-22 11:21:10 +0300
commit352204543fb730dbb44e28ec2623d89f179a73de (patch)
tree781c1898a631472fd9cf964f81ab163a43fb5310 /tests/PHPUnit/Framework/TestRequest
parent2d5f717935e9138467f5050959a8350a7401b16f (diff)
Make sure request URLs are strings in TestRequest\Collection::checkEnoughUrlsAreTested.
Diffstat (limited to 'tests/PHPUnit/Framework/TestRequest')
-rw-r--r--tests/PHPUnit/Framework/TestRequest/Collection.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/TestRequest/Collection.php b/tests/PHPUnit/Framework/TestRequest/Collection.php
index e05ef7d5cd..219a68f83a 100644
--- a/tests/PHPUnit/Framework/TestRequest/Collection.php
+++ b/tests/PHPUnit/Framework/TestRequest/Collection.php
@@ -12,6 +12,7 @@ use Piwik\API\DocumentationGenerator;
use Piwik\API\Proxy;
use Piwik\API\Request;
use Piwik\Tests\Framework\TestCase\SystemTestCase;
+use Piwik\Url;
use Piwik\UrlHelper;
use \Exception;
@@ -151,6 +152,9 @@ class Collection
if (empty($requestUrls)
|| $approximateCountApiToCall > $countUrls
) {
+ $requestUrls = array_map(function ($params) {
+ return is_string($params) ? $params : Url::getQueryStringFromParameters($params);
+ }, $requestUrls);
throw new Exception("Only generated $countUrls API calls to test but was expecting more for this test.\n" .
"Want to test APIs: " . implode(", ", $this->apiToCall) . ")\n" .
"But only generated these URLs: \n" . implode("\n", $requestUrls) . ")\n"