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
path: root/tests
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-11 23:36:34 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-11 23:36:34 +0400
commit49e970d284fa3577edf9234190387042bc2a236e (patch)
treeed3cbf84f87cf949ea9e78fb083e282f077aad22 /tests
parent04db6f7e576b4eed561938238ca03c78efc369f6 (diff)
refs #5820 and more test fixes... they all worked when executed standalone but not when executing the whole suite...
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Integration/Core/ReportTest.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/PHPUnit/Integration/Core/ReportTest.php b/tests/PHPUnit/Integration/Core/ReportTest.php
index fd10e0e617..0d83ff40f7 100644
--- a/tests/PHPUnit/Integration/Core/ReportTest.php
+++ b/tests/PHPUnit/Integration/Core/ReportTest.php
@@ -15,6 +15,7 @@ use Piwik\WidgetsList;
use Piwik\Translate;
use Piwik\Menu\MenuReporting;
use Piwik\Plugin\Manager as PluginManager;
+use Piwik\Tests\Fixture;
class GetBasicReport extends Report
{
@@ -91,6 +92,11 @@ class Plugin_ReportTest extends DatabaseTestCase
public function setUp()
{
parent::setUp();
+
+ Fixture::createWebsite('2014-01-01 00:00:00');
+ $this->unloadAllPlugins();
+ $_GET['idSite'] = 1;
+
$this->exampleReport = new GetExampleReport();
$this->disabledReport = new GetDisabledReport();
$this->basicReport = new GetBasicReport();
@@ -102,6 +108,7 @@ class Plugin_ReportTest extends DatabaseTestCase
WidgetsList::getInstance()->_reset();
MenuReporting::getInstance()->unsetInstance();
Translate::unloadEnglishTranslation();
+ unset($_GET['idSite']);
parent::tearDown();
}
@@ -215,18 +222,17 @@ class Plugin_ReportTest extends DatabaseTestCase
$menuItems = $menu->getMenu();
$expected = array(
- '_tooltip' => '',
+ '_tooltip' => false,
'_order' => 20,
- '_hasSubmenu' => 1,
+ '_hasSubmenu' => true,
'Actions_SubmenuPageTitles' => array(
'_url' => array(
'module' => 'TestPlugin',
- 'action' => 'menuGetAdvancedReport',
- 'idSite' => '',
+ 'action' => 'menuGetAdvancedReport'
),
'_order' => 20,
'_name' => 'Actions_SubmenuPageTitles',
- '_tooltip' => '',
+ '_tooltip' => false,
));
$this->assertCount(1, $menuItems);