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 <diosmosis@users.noreply.github.com>2019-11-28 01:30:59 +0300
committerGitHub <noreply@github.com>2019-11-28 01:30:59 +0300
commit7c1ddeae4f02c4fdd3bcb53db09f9d217dd0647f (patch)
tree6516256f58d3e64a9d7ed8e1a2381f7efe7e525a /plugins
parent6125a0838839b11b95fd2043cc47cd4949de766c (diff)
Fix build (#15202)
* fixing build * fixing tests
Diffstat (limited to 'plugins')
-rw-r--r--plugins/API/API.php8
-rw-r--r--plugins/API/tests/System/AutoSuggestAPITest.php2
-rw-r--r--plugins/API/tests/System/expected/test_AutoSuggestAPITest_productCategory__API.getSuggestedValuesForSegment.xml6
m---------plugins/CustomDimensions0
-rw-r--r--plugins/Marketplace/tests/System/Api/ClientTest.php5
5 files changed, 10 insertions, 11 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 30fbfbcf93..f84c95f443 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -194,7 +194,7 @@ class API extends \Piwik\Plugin\API
$sites = (is_array($idSites) ? implode('.', $idSites) : (int) $idSites);
$cache = Cache::getTransientCache();
- $cacheKey = 'API.getSegmentsMetadata' . $sites . '_' . (int) $_hideImplementationData . '_' . (int) $isNotAnonymous;
+ $cacheKey = 'API.getSegmentsMetadata' . $sites . '_' . (int) $_hideImplementationData . '_' . (int) $isNotAnonymous . '_' . (int) $_showAllSegments;
$cacheKey = CacheId::pluginAware($cacheKey);
if ($cache->contains($cacheKey)) {
@@ -597,7 +597,7 @@ class API extends \Piwik\Plugin\API
if (!empty($segment['unionOfSegments'])) {
$values = array();
foreach ($segment['unionOfSegments'] as $unionSegmentName) {
- $unionSegment = $this->findSegment($unionSegmentName, $idSite);
+ $unionSegment = $this->findSegment($unionSegmentName, $idSite, $_showAllSegments = true);
try {
$result = $this->getSuggestedValuesForSegmentName($idSite, $unionSegment, $maxSuggestionsToReturn);
@@ -655,9 +655,9 @@ class API extends \Piwik\Plugin\API
return $pages;
}
- private function findSegment($segmentName, $idSite)
+ private function findSegment($segmentName, $idSite, $_showAllSegments = false)
{
- $segmentsMetadata = $this->getSegmentsMetadata($idSite, $_hideImplementationData = false);
+ $segmentsMetadata = $this->getSegmentsMetadata($idSite, $_hideImplementationData = false, $_showAllSegments);
$segmentFound = false;
foreach ($segmentsMetadata as $segmentMetadata) {
diff --git a/plugins/API/tests/System/AutoSuggestAPITest.php b/plugins/API/tests/System/AutoSuggestAPITest.php
index 5e8bfac0f8..006f780424 100644
--- a/plugins/API/tests/System/AutoSuggestAPITest.php
+++ b/plugins/API/tests/System/AutoSuggestAPITest.php
@@ -196,7 +196,7 @@ class AutoSuggestAPITest extends SystemTestCase
public function testCheckOtherTestsWereComplete()
{
// Check that only a few haven't been tested specifically (these are all custom variables slots since we only test slot 1, 2, 5 (see the fixture) and example dimension slots and bandwidth)
- $maximumSegmentsToSkip = 17;
+ $maximumSegmentsToSkip = 21;
$this->assertLessThan($maximumSegmentsToSkip, count(self::$skipped), 'SKIPPED ' . count(self::$skipped) . ' segments --> some segments had no "auto-suggested values"
but we should try and test the autosuggest for all new segments. Segments skipped were: ' . implode(', ', self::$skipped));
diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_productCategory__API.getSuggestedValuesForSegment.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_productCategory__API.getSuggestedValuesForSegment.xml
index 138c5a1f30..c234bed59e 100644
--- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_productCategory__API.getSuggestedValuesForSegment.xml
+++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_productCategory__API.getSuggestedValuesForSegment.xml
@@ -1,6 +1,2 @@
<?xml version="1.0" encoding="utf-8" ?>
-<result>
- <error message="Requested segment productCategory1 not found.
-
- --&gt; To temporarily debug this error further, set const PIWIK_PRINT_ERROR_BACKTRACE=true; in index.php" />
-</result> \ No newline at end of file
+<result /> \ No newline at end of file
diff --git a/plugins/CustomDimensions b/plugins/CustomDimensions
-Subproject 6f0ee47e885cdc8b4c77b903a8566d08b21a93e
+Subproject 70d45d15d4a9b208b8723ee4dc7eca7b8581282
diff --git a/plugins/Marketplace/tests/System/Api/ClientTest.php b/plugins/Marketplace/tests/System/Api/ClientTest.php
index 588d4b1455..694be41eb3 100644
--- a/plugins/Marketplace/tests/System/Api/ClientTest.php
+++ b/plugins/Marketplace/tests/System/Api/ClientTest.php
@@ -99,7 +99,10 @@ class ClientTest extends SystemTestCase
$this->assertNotEmpty($plugin['versions']);
$lastVersion = $plugin['versions'][count($plugin['versions']) - 1];
- $this->assertEquals(array('name', 'release', 'requires', 'numDownloads', 'license', 'repositoryChangelogUrl', 'readmeHtml', 'download'), array_keys($lastVersion));
+ $this->assertEquals(
+ array('name', 'release', 'requires', 'wordPressCompatible', 'onPremiseCompatible', 'numDownloads', 'license', 'repositoryChangelogUrl', 'readmeHtml', 'download'),
+ array_keys($lastVersion)
+ );
$this->assertNotEmpty($lastVersion['download']);
}