summaryrefslogtreecommitdiff
path: root/tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-30 07:47:16 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-30 07:47:16 -0500
commite31dbe18ce4f156c7a0fcb286c60c9b2617c2f47 (patch)
treeb33d4fd5dbce3d88056929825e32767f560cf6c1 /tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php
parent9b9d823f30f7f7744f412df8ca4c52d7be3c9977 (diff)
Load ActionProvider in unit tests
Diffstat (limited to 'tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php')
-rw-r--r--tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php b/tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php
index 75cb181d..8eb370a2 100644
--- a/tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php
+++ b/tests/units/Analytic/AverageTimeSpentColumnAnalyticTest.php
@@ -16,13 +16,14 @@ class AverageTimeSpentColumnAnalyticTest extends Base
$taskCreationModel = new TaskCreation($this->container);
$projectModel = new Project($this->container);
$averageLeadCycleTimeAnalytic = new AverageTimeSpentColumnAnalytic($this->container);
- $now = time();
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test')));
$this->assertEquals(2, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test')));
+ $now = time();
+
$this->container['db']->table(Task::TABLE)->eq('id', 1)->update(array('date_completed' => $now + 3600));
$this->container['db']->table(Task::TABLE)->eq('id', 2)->update(array('date_completed' => $now + 1800));