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:
authorsgiehl <stefan@matomo.org>2020-03-16 15:12:52 +0300
committersgiehl <stefan@matomo.org>2020-03-16 17:24:12 +0300
commite493fee87c983e02001a7d9438cefe58141a38af (patch)
tree6c8f97e69b7cac83f9bb0b670d658e4c871d4d79 /plugins/Live/tests/Integration
parentf8c78e5f5f5c63ef660e1bb36fa059b59a1f7976 (diff)
parent7c1d70583ba18a5ec34b691bc7ca0862b8db17a1 (diff)
Merge branch '3.x-dev' into 4.x-dev
Diffstat (limited to 'plugins/Live/tests/Integration')
-rw-r--r--plugins/Live/tests/Integration/ModelTest.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/Live/tests/Integration/ModelTest.php b/plugins/Live/tests/Integration/ModelTest.php
index ea2b104732..d66872e44d 100644
--- a/plugins/Live/tests/Integration/ModelTest.php
+++ b/plugins/Live/tests/Integration/ModelTest.php
@@ -82,8 +82,7 @@ class ModelTest extends IntegrationTestCase
$dateEnd = Date::now();
$minTimestamp = 1;
$limit = 50;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, [$sql, $bind]);
$this->assertTrue(true);
}
@@ -101,8 +100,7 @@ class ModelTest extends IntegrationTestCase
$dateEnd = Date::now();
$minTimestamp = null;
$limit = 50;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, [$sql, $bind]);
}
public function test_handleMaxExecutionTimeError_whenTimeIsExceeded_manyReasonsFound()
@@ -112,15 +110,12 @@ class ModelTest extends IntegrationTestCase
$db = Db::get();
$e = new \Exception('Query execution was interrupted, maximum statement execution time exceeded');
- $sql = 'SELECT 1';
- $bind = array();
$segment = 'userId>=1';
$dateStart = Date::now()->subDay(10);
$dateEnd = Date::now();
$minTimestamp = null;
$limit = 5000;
- $model = new Model();
- $model->handleMaxExecutionTimeError($db, $e, $sql, $bind, $segment, $dateStart, $dateEnd, $minTimestamp, $limit);
+ Model::handleMaxExecutionTimeError($db, $e, $segment, $dateStart, $dateEnd, $minTimestamp, $limit, ['param' => 'value']);
}
public function test_getStandAndEndDate()