diff options
Diffstat (limited to 'tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php')
-rw-r--r-- | tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php b/tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php index b87e9573..831ec960 100644 --- a/tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php +++ b/tests/units/Analytic/AverageLeadCycleTimeAnalyticTest.php @@ -2,17 +2,17 @@ require_once __DIR__.'/../Base.php'; -use Kanboard\Model\TaskCreation; -use Kanboard\Model\Project; -use Kanboard\Model\Task; +use Kanboard\Model\TaskCreationModel; +use Kanboard\Model\ProjectModel; +use Kanboard\Model\TaskModel; use Kanboard\Analytic\AverageLeadCycleTimeAnalytic; class AverageLeadCycleTimeAnalyticTest extends Base { public function testBuild() { - $taskCreationModel = new TaskCreation($this->container); - $projectModel = new Project($this->container); + $taskCreationModel = new TaskCreationModel($this->container); + $projectModel = new ProjectModel($this->container); $averageLeadCycleTimeAnalytic = new AverageLeadCycleTimeAnalytic($this->container); $now = time(); @@ -26,19 +26,19 @@ class AverageLeadCycleTimeAnalyticTest extends Base $this->assertEquals(5, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test'))); // LT=3600 CT=1800 - $this->container['db']->table(Task::TABLE)->eq('id', 1)->update(array('date_completed' => $now + 3600, 'date_started' => $now + 1800)); + $this->container['db']->table(TaskModel::TABLE)->eq('id', 1)->update(array('date_completed' => $now + 3600, 'date_started' => $now + 1800)); // LT=1800 CT=900 - $this->container['db']->table(Task::TABLE)->eq('id', 2)->update(array('date_completed' => $now + 1800, 'date_started' => $now + 900)); + $this->container['db']->table(TaskModel::TABLE)->eq('id', 2)->update(array('date_completed' => $now + 1800, 'date_started' => $now + 900)); // LT=3600 CT=0 - $this->container['db']->table(Task::TABLE)->eq('id', 3)->update(array('date_completed' => $now + 3600)); + $this->container['db']->table(TaskModel::TABLE)->eq('id', 3)->update(array('date_completed' => $now + 3600)); // LT=2*3600 CT=0 - $this->container['db']->table(Task::TABLE)->eq('id', 4)->update(array('date_completed' => $now + 2 * 3600)); + $this->container['db']->table(TaskModel::TABLE)->eq('id', 4)->update(array('date_completed' => $now + 2 * 3600)); // CT=0 - $this->container['db']->table(Task::TABLE)->eq('id', 5)->update(array('date_started' => $now + 900)); + $this->container['db']->table(TaskModel::TABLE)->eq('id', 5)->update(array('date_started' => $now + 900)); $stats = $averageLeadCycleTimeAnalytic->build(1); @@ -51,7 +51,7 @@ class AverageLeadCycleTimeAnalyticTest extends Base public function testBuildWithNoTasks() { - $projectModel = new Project($this->container); + $projectModel = new ProjectModel($this->container); $averageLeadCycleTimeAnalytic = new AverageLeadCycleTimeAnalytic($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'test1'))); |