From 15038cdb10f8c691edc7980fd1aed32dcbed3f9f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 22 Nov 2014 10:05:44 -0500 Subject: Move task creation to a seperate class --- tests/units/TimeTrackingTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/units/TimeTrackingTest.php') diff --git a/tests/units/TimeTrackingTest.php b/tests/units/TimeTrackingTest.php index eb8b6a61..b7790b51 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\TaskCreation; use Model\TaskFinder; use Model\Project; use Model\TimeTracking; @@ -13,13 +14,14 @@ class TimeTrackingTest extends Base public function testCalculateTime() { $t = new Task($this->container); + $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); $p = new Project($this->container); $s = new SubTask($this->container); $ts = new TimeTracking($this->container); $this->assertEquals(1, $p->create(array('name' => 'Project #1'))); - $this->assertEquals(1, $t->create(array('title' => 'Task #1', 'project_id' => 1, 'time_estimated' => 4.5))); + $this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1, 'time_estimated' => 4.5))); $this->assertTrue($t->update(array('id' => 1, 'time_spent' => 3.5))); $task = $tf->getById(1); -- cgit v1.2.3