Move task creation to a seperate class

This commit is contained in:
Frédéric Guillot
2014-11-22 10:05:44 -05:00
parent 8f0e544cd9
commit 15038cdb10
36 changed files with 1061 additions and 296 deletions

View File

@@ -3,6 +3,7 @@
require_once __DIR__.'/Base.php';
use Model\Task;
use Model\TaskCreation;
use Model\TaskFinder;
use Model\Project;
use Model\GithubWebhook;
@@ -82,11 +83,11 @@ class ActionTaskCloseTest extends Base
$action->setParam('column_id', 2);
// We create a task in the first column
$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' => 'test')));
$this->assertEquals(1, $t->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 1)));
$this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 1)));
// We create an event to move the task to the 2nd column
$event = array(