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/UserTest.php | |
parent | b7060b33ef317eeac576c504b1fb840d4471e411 (diff) |
Move some Task model methods to the TaskFinder class
Diffstat (limited to 'tests/units/UserTest.php')
-rw-r--r-- | tests/units/UserTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php index 9a304e85..b66a6c27 100644 --- a/tests/units/UserTest.php +++ b/tests/units/UserTest.php @@ -4,6 +4,7 @@ require_once __DIR__.'/Base.php'; use Model\User; use Model\Task; +use Model\TaskFinder; use Model\Project; class UserTest extends Base @@ -110,13 +111,14 @@ class UserTest extends Base { $u = new User($this->registry); $t = new Task($this->registry); + $tf = new TaskFinder($this->registry); $p = new Project($this->registry); $this->assertTrue($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto'))); $this->assertEquals(1, $p->create(array('name' => 'Project #1'))); $this->assertEquals(1, $t->create(array('title' => 'Task #1', 'project_id' => 1, 'owner_id' => 2))); - $task = $t->getById(1); + $task = $tf->getById(1); $this->assertEquals(1, $task['id']); $this->assertEquals(2, $task['owner_id']); @@ -126,7 +128,7 @@ class UserTest extends Base $this->assertFalse($u->remove(55)); // Make sure that assigned tasks are unassigned after removing the user - $task = $t->getById(1); + $task = $tf->getById(1); $this->assertEquals(1, $task['id']); $this->assertEquals(0, $task['owner_id']); } |