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:
authordizzy <diosmosis@users.noreply.github.com>2021-08-12 10:13:00 +0300
committerGitHub <noreply@github.com>2021-08-12 10:13:00 +0300
commit9873cb71e66be0f80839c76e923c3b866dd23b46 (patch)
tree3973fe06503f6099998c85e5cf435146b1b9a711 /tests/PHPUnit/Framework
parent99136cbf3183833b5d9dedb7943873fb8c3a8da5 (diff)
avoid large amounts of notifications being added to the session (#17736)
* impose limit on notification message size when logging to notifications * if in memory notification count exceeds max notification size in session, do not attempt to new ones it to the session * Detect when session was too large to read and provide warning to user. * add some tests for Notification\ManagerTest.php * add tests for relevant DbTable members * Change session data column type to allow larger session data values. * update to rc3 * trigger new build? * fix namespace * fix test namespaces * bump version correctly
Diffstat (limited to 'tests/PHPUnit/Framework')
-rw-r--r--tests/PHPUnit/Framework/Fixture.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index bb5e33a9bd..8050865eff 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -43,6 +43,7 @@ use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Plugins\UsersManager\API as APIUsersManager;
use Piwik\Plugins\UsersManager\UsersManager;
use Piwik\ReportRenderer;
+use Piwik\Session\SaveHandler\DbTable;
use Piwik\SettingsPiwik;
use Piwik\SettingsServer;
use Piwik\Singleton;
@@ -392,6 +393,7 @@ class Fixture extends \PHPUnit\Framework\Assert
public static function clearInMemoryCaches($resetTranslations = true)
{
+ DbTable::$wasSessionToLargeToRead = false;
Date::$now = null;
FrontController::$requestId = null;
Cache::$cache = null;
@@ -411,6 +413,7 @@ class Fixture extends \PHPUnit\Framework\Assert
\Piwik\Plugins\ScheduledReports\API::$cache = array();
Singleton::clearAll();
PluginsArchiver::$archivers = array();
+ \Piwik\Notification\Manager::cancelAllNotifications();
Plugin\API::unsetAllInstances();
$_GET = $_REQUEST = array();