diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
commit | 14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch) | |
tree | 79972d53f6091a1ddb17f64a6a05a5523f5d5168 /tests/units/Model/ProjectDailyColumnStatsTest.php | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'tests/units/Model/ProjectDailyColumnStatsTest.php')
-rw-r--r-- | tests/units/Model/ProjectDailyColumnStatsTest.php | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/units/Model/ProjectDailyColumnStatsTest.php b/tests/units/Model/ProjectDailyColumnStatsTest.php index 4f92ad2b..5e500340 100644 --- a/tests/units/Model/ProjectDailyColumnStatsTest.php +++ b/tests/units/Model/ProjectDailyColumnStatsTest.php @@ -2,29 +2,29 @@ require_once __DIR__.'/../Base.php'; -use Kanboard\Model\Project; -use Kanboard\Model\ProjectDailyColumnStats; -use Kanboard\Model\Config; -use Kanboard\Model\Task; -use Kanboard\Model\TaskCreation; +use Kanboard\Model\ProjectModel; +use Kanboard\Model\ProjectDailyColumnStatsModel; +use Kanboard\Model\ConfigModel; +use Kanboard\Model\TaskModel; +use Kanboard\Model\TaskCreationModel; class ProjectDailyColumnStatsTest extends Base { public function testUpdateTotalsWithScoreAtNull() { - $projectModel = new Project($this->container); - $projectDailyColumnStats = new ProjectDailyColumnStats($this->container); - $taskCreationModel = new TaskCreation($this->container); + $projectModel = new ProjectModel($this->container); + $projectDailyColumnStats = new ProjectDailyColumnStatsModel($this->container); + $taskCreationModel = new TaskCreationModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest'))); $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test'))); $projectDailyColumnStats->updateTotals(1, '2016-01-16'); - $task = $this->container['db']->table(Task::TABLE)->findOne(); + $task = $this->container['db']->table(TaskModel::TABLE)->findOne(); $this->assertNull($task['score']); - $stats = $this->container['db']->table(ProjectDailyColumnStats::TABLE) + $stats = $this->container['db']->table(ProjectDailyColumnStatsModel::TABLE) ->asc('day') ->asc('column_id') ->columns('day', 'project_id', 'column_id', 'total', 'score') @@ -45,8 +45,8 @@ class ProjectDailyColumnStatsTest extends Base public function testUpdateTotals() { - $projectModel = new Project($this->container); - $projectDailyColumnStats = new ProjectDailyColumnStats($this->container); + $projectModel = new ProjectModel($this->container); + $projectDailyColumnStats = new ProjectDailyColumnStatsModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest'))); $this->createTasks(1, 2, 1); @@ -68,7 +68,7 @@ class ProjectDailyColumnStatsTest extends Base $projectDailyColumnStats->updateTotals(1, '2016-01-17'); - $stats = $this->container['db']->table(ProjectDailyColumnStats::TABLE) + $stats = $this->container['db']->table(ProjectDailyColumnStatsModel::TABLE) ->asc('day') ->asc('column_id') ->columns('day', 'project_id', 'column_id', 'total', 'score') @@ -117,9 +117,9 @@ class ProjectDailyColumnStatsTest extends Base public function testUpdateTotalsWithOnlyOpenTasks() { - $configModel = new Config($this->container); - $projectModel = new Project($this->container); - $projectDailyColumnStats = new ProjectDailyColumnStats($this->container); + $configModel = new ConfigModel($this->container); + $projectModel = new ProjectModel($this->container); + $projectDailyColumnStats = new ProjectDailyColumnStatsModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest'))); $this->assertTrue($configModel->save(array('cfd_include_closed_tasks' => 0))); @@ -144,7 +144,7 @@ class ProjectDailyColumnStatsTest extends Base $projectDailyColumnStats->updateTotals(1, '2016-01-17'); - $stats = $this->container['db']->table(ProjectDailyColumnStats::TABLE) + $stats = $this->container['db']->table(ProjectDailyColumnStatsModel::TABLE) ->asc('day') ->asc('column_id') ->columns('day', 'project_id', 'column_id', 'total', 'score') @@ -193,8 +193,8 @@ class ProjectDailyColumnStatsTest extends Base public function testCountDays() { - $projectModel = new Project($this->container); - $projectDailyColumnStats = new ProjectDailyColumnStats($this->container); + $projectModel = new ProjectModel($this->container); + $projectDailyColumnStats = new ProjectDailyColumnStatsModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest'))); @@ -208,8 +208,8 @@ class ProjectDailyColumnStatsTest extends Base public function testGetAggregatedMetrics() { - $projectModel = new Project($this->container); - $projectDailyColumnStats = new ProjectDailyColumnStats($this->container); + $projectModel = new ProjectModel($this->container); + $projectDailyColumnStats = new ProjectDailyColumnStatsModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest'))); $this->createTasks(1, 2, 1); @@ -258,7 +258,7 @@ class ProjectDailyColumnStatsTest extends Base private function createTasks($column_id, $score, $is_active) { - $taskCreationModel = new TaskCreation($this->container); + $taskCreationModel = new TaskCreationModel($this->container); $this->assertNotFalse($taskCreationModel->create(array('project_id' => 1, 'title' => 'test', 'column_id' => $column_id, 'score' => $score, 'is_active' => $is_active))); } } |