diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 15:32:35 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 15:32:35 -0400 |
commit | 4061927d215c846ff8eb196301bf61532018042b (patch) | |
tree | 0e14a0e458ee8739754f75f8c158cc42a9b593a4 /tests/units/TimeTrackingTest.php | |
parent | b7060b33ef317eeac576c504b1fb840d4471e411 (diff) |
Move some Task model methods to the TaskFinder class
Diffstat (limited to 'tests/units/TimeTrackingTest.php')
-rw-r--r-- | tests/units/TimeTrackingTest.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/units/TimeTrackingTest.php b/tests/units/TimeTrackingTest.php index 50d5cb53..aa772a36 100644 --- a/tests/units/TimeTrackingTest.php +++ b/tests/units/TimeTrackingTest.php @@ -4,6 +4,7 @@ require_once __DIR__.'/Base.php'; use Model\SubTask; use Model\Task; +use Model\TaskFinder; use Model\Project; use Model\TimeTracking; @@ -12,6 +13,7 @@ class TimeTrackingTest extends Base public function testCalculateTime() { $t = new Task($this->registry); + $tf = new TaskFinder($this->registry); $p = new Project($this->registry); $s = new SubTask($this->registry); $ts = new TimeTracking($this->registry); @@ -20,7 +22,7 @@ class TimeTrackingTest extends Base $this->assertEquals(1, $t->create(array('title' => 'Task #1', 'project_id' => 1, 'time_estimated' => 4.5))); $this->assertTrue($t->update(array('id' => 1, 'time_spent' => 3.5))); - $task = $t->getById(1); + $task = $tf->getById(1); $this->assertNotEmpty($task); $this->assertEquals(4.5, $task['time_estimated']); $this->assertEquals(3.5, $task['time_spent']); |