diff options
author | sgiehl <stefan@matomo.org> | 2020-03-16 15:12:52 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2020-03-16 17:24:12 +0300 |
commit | e493fee87c983e02001a7d9438cefe58141a38af (patch) | |
tree | 6c8f97e69b7cac83f9bb0b670d658e4c871d4d79 /plugins/Live/tests/Integration | |
parent | f8c78e5f5f5c63ef660e1bb36fa059b59a1f7976 (diff) | |
parent | 7c1d70583ba18a5ec34b691bc7ca0862b8db17a1 (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.php | 11 |
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() |