diff options
Diffstat (limited to 'tests/units/Model/TaskTest.php')
-rw-r--r-- | tests/units/Model/TaskTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/units/Model/TaskTest.php b/tests/units/Model/TaskTest.php new file mode 100644 index 00000000..ebafa612 --- /dev/null +++ b/tests/units/Model/TaskTest.php @@ -0,0 +1,29 @@ +<?php + +require_once __DIR__.'/../Base.php'; + +use Model\Task; +use Model\TaskCreation; +use Model\TaskFinder; +use Model\TaskStatus; +use Model\Project; +use Model\ProjectPermission; +use Model\Category; +use Model\User; + +class TaskTest extends Base +{ + public function testRemove() + { + $t = new Task($this->container); + $tc = new TaskCreation($this->container); + $tf = new TaskFinder($this->container); + $p = new Project($this->container); + + $this->assertEquals(1, $p->create(array('name' => 'UnitTest'))); + $this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1))); + + $this->assertTrue($t->remove(1)); + $this->assertFalse($t->remove(1234)); + } +} |