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/ActionTaskDuplicateAnotherProjectTest.php | |
parent | b7060b33ef317eeac576c504b1fb840d4471e411 (diff) |
Move some Task model methods to the TaskFinder class
Diffstat (limited to 'tests/units/ActionTaskDuplicateAnotherProjectTest.php')
-rw-r--r-- | tests/units/ActionTaskDuplicateAnotherProjectTest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/units/ActionTaskDuplicateAnotherProjectTest.php b/tests/units/ActionTaskDuplicateAnotherProjectTest.php index 75aeedf8..6fb3c8d8 100644 --- a/tests/units/ActionTaskDuplicateAnotherProjectTest.php +++ b/tests/units/ActionTaskDuplicateAnotherProjectTest.php @@ -3,6 +3,7 @@ require_once __DIR__.'/Base.php'; use Model\Task; +use Model\TaskFinder; use Model\Project; class ActionTaskDuplicateAnotherProject extends Base @@ -42,6 +43,7 @@ class ActionTaskDuplicateAnotherProject extends Base // We create a task in the first column $t = new Task($this->registry); + $tf = new TaskFinder($this->registry); $p = new Project($this->registry); $this->assertEquals(1, $p->create(array('name' => 'project 1'))); $this->assertEquals(2, $p->create(array('name' => 'project 2'))); @@ -60,7 +62,7 @@ class ActionTaskDuplicateAnotherProject extends Base $this->assertFalse($action->execute($event)); // Our task should be assigned to the project 1 - $task = $t->getById(1); + $task = $tf->getById(1); $this->assertNotEmpty($task); $this->assertEquals(1, $task['project_id']); @@ -77,12 +79,12 @@ class ActionTaskDuplicateAnotherProject extends Base $this->assertTrue($action->execute($event)); // Our task should be assigned to the project 1 - $task = $t->getById(1); + $task = $tf->getById(1); $this->assertNotEmpty($task); $this->assertEquals(1, $task['project_id']); // We should have another task assigned to the project 2 - $task = $t->getById(2); + $task = $tf->getById(2); $this->assertNotEmpty($task); $this->assertEquals(2, $task['project_id']); } |