From 70f0de1f0edf9a099dbfef2d2302e8b50576720c Mon Sep 17 00:00:00 2001 From: Thomas Steur <thomas.steur@googlemail.com> Date: Fri, 18 Jul 2014 14:18:44 +0200 Subject: [PATCH] refs #5820 added new test to make sure the report always uses default metrics by default --- tests/PHPUnit/Core/Plugin/ReportTest.php | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/PHPUnit/Core/Plugin/ReportTest.php diff --git a/tests/PHPUnit/Core/Plugin/ReportTest.php b/tests/PHPUnit/Core/Plugin/ReportTest.php new file mode 100644 index 0000000000..820137d996 --- /dev/null +++ b/tests/PHPUnit/Core/Plugin/ReportTest.php @@ -0,0 +1,37 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ + +use Piwik\Plugin\Report; +use Piwik\Plugins\ExamplePlugin\Reports\GetExampleReport; +use Piwik\Metrics; + +/** + * @group Core + */ +class Plugin_ReportTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Report + */ + private $report; + + public function setUp() + { + $this->report = new GetExampleReport(); + } + + public function test_reportShouldUseDefaultMetrics() + { + $this->assertEquals(Metrics::getDefaultMetrics(), $this->report->getMetrics()); + } + + public function test_reportShouldUseDefaultProcessedMetrics() + { + $this->assertEquals(Metrics::getDefaultProcessedMetrics(), $this->report->getProcessedMetrics()); + } +} \ No newline at end of file -- GitLab