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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-08-23 04:17:56 +0300
committerGitHub <noreply@github.com>2016-08-23 04:17:56 +0300
commitaaed436a073bcb2f86019bbef222e5a1a994e635 (patch)
tree4d4b95ec02772383f644455f6c1713065f4d3ad7 /plugins/MultiSites
parent58d7fb3f8065eaee299396fc2347ecdb8f9bdc77 (diff)
Fix fatal error when requesting RSS format (#10407)
* Fixes #10399 * add test reproducing issue #10399 * another health check
Diffstat (limited to 'plugins/MultiSites')
-rw-r--r--plugins/MultiSites/tests/Integration/MultiSitesTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/MultiSites/tests/Integration/MultiSitesTest.php b/plugins/MultiSites/tests/Integration/MultiSitesTest.php
index 8b6d7924a7..b027bef0b7 100644
--- a/plugins/MultiSites/tests/Integration/MultiSitesTest.php
+++ b/plugins/MultiSites/tests/Integration/MultiSitesTest.php
@@ -9,6 +9,7 @@
namespace Piwik\Plugins\MultiSites\tests\Integration;
use Piwik\Access;
+use Piwik\FrontController;
use Piwik\Plugins\MultiSites\API as APIMultiSites;
use Piwik\Plugins\SitesManager\API as APISitesManager;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
@@ -49,4 +50,28 @@ class MultiSitesTest extends IntegrationTestCase
// safety net
$this->assertEquals(0, $dataTable->getFirstRow()->getColumn('nb_visits'));
}
+
+ /**
+ * Testing that getOne does not error out when format=rss, #10407
+ *
+ * @group Plugins
+ */
+ public function testWhenRssFormatGetOneDoesNotError()
+ {
+ $_GET = array(
+ 'method' => 'MultiSites.getOne',
+ 'idSite' => $this->idSiteAccess,
+ 'period' => 'month',
+ 'date' => 'last10',
+ 'format' => 'rss'
+ );
+
+ $output = FrontController::getInstance()->fetchDispatch('API');
+
+ $this->assertContains('<item>', $output);
+ $this->assertContains('</rss>', $output);
+ $this->assertNotContains('error', $output);
+
+ $_GET = array();
+ }
}