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:
authormattab <matthieu.aubry@gmail.com>2014-04-03 05:22:39 +0400
committermattab <matthieu.aubry@gmail.com>2014-04-03 05:22:39 +0400
commit0e1299365537880b1e5d6e2e2921dc3ab5d3731b (patch)
tree2051722313a0fdb0b4cbcc9a0f315dd6d630e68a /tests
parente48578145e3cc815cadc8f41c45569ed54079468 (diff)
Fix a test
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Core/ReleaseCheckListTest.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php
index 02e55aac36..fdcd0cce0c 100644
--- a/tests/PHPUnit/Core/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php
@@ -14,6 +14,7 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase
public function setUp()
{
$this->globalConfig = _parse_ini_file(PIWIK_PATH_TEST_TO_ROOT . '/config/global.ini.php', true);
+
parent::setUp();
}
/**
@@ -88,7 +89,11 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase
require_once PIWIK_INCLUDE_PATH . "/core/TaskScheduler.php";
$this->assertFalse(DEBUG_FORCE_SCHEDULED_TASKS);
- $this->assertFalse(PIWIK_PRINT_ERROR_BACKTRACE);
+
+ // Check the index.php has "backtrace disabled"
+ $content = file_get_contents(PIWIK_INCLUDE_PATH . "/index.php");
+ $expected = "define('PIWIK_PRINT_ERROR_BACKTRACE', false);";
+ $this->assertTrue( false !== strpos($content, $expected), 'index.php should contain: ' . $expected);
}
private function _checkEqual($key, $valueExpected)
@@ -147,19 +152,7 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase
public function testPiwikTrackerDebugIsOff()
{
$this->assertTrue(!isset($GLOBALS['PIWIK_TRACKER_DEBUG']));
-
- $oldGet = $_GET;
- $_GET = array('idsite' => 1);
-
- // hiding echoed out message on empty request
- ob_start();
- include PIWIK_PATH_TEST_TO_ROOT . "/piwik.php";
- ob_end_clean();
-
- $_GET = $oldGet;
-
- $this->assertEquals(0, \Piwik\Config::getInstance()->Tracker['debug']);
- $this->assertTrue($GLOBALS['PIWIK_TRACKER_DEBUG'] === false);
+ $this->assertEquals(0, $this->globalConfig['Tracker']['debug']);
}
/**