diff options
Diffstat (limited to 'tests/units/ActionTest.php')
-rw-r--r-- | tests/units/ActionTest.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/units/ActionTest.php b/tests/units/ActionTest.php index dd8e11fe..1115e4fc 100644 --- a/tests/units/ActionTest.php +++ b/tests/units/ActionTest.php @@ -6,6 +6,7 @@ use Model\Action; use Model\Project; use Model\Board; use Model\Task; +use Model\TaskCreation; use Model\TaskFinder; use Model\Category; @@ -49,7 +50,8 @@ class ActionTest extends Base public function testEventMoveColumn() { - $task = new Task($this->container); + $t = new Task($this->container); + $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); $board = new Board($this->container); $project = new Project($this->container); @@ -59,7 +61,7 @@ class ActionTest extends Base $this->assertEquals(1, $project->create(array('name' => 'unit_test'))); // We create a task - $this->assertEquals(1, $task->create(array( + $this->assertEquals(1, $tc->create(array( 'title' => 'unit_test', 'project_id' => 1, 'owner_id' => 1, @@ -86,7 +88,7 @@ class ActionTest extends Base $this->assertEquals(1, $t1['column_id']); // We move our task - $task->movePosition(1, 1, 4, 1); + $t->movePosition(1, 1, 4, 1); $this->assertTrue($this->container['event']->isEventTriggered(Task::EVENT_MOVE_COLUMN)); $this->assertFalse($this->container['event']->isEventTriggered(Task::EVENT_UPDATE)); @@ -99,7 +101,8 @@ class ActionTest extends Base public function testExecuteMultipleActions() { - $task = new Task($this->container); + $t = new Task($this->container); + $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); $board = new Board($this->container); $project = new Project($this->container); @@ -110,7 +113,7 @@ class ActionTest extends Base $this->assertEquals(2, $project->create(array('name' => 'unit_test2'))); // We create a task - $this->assertEquals(1, $task->create(array( + $this->assertEquals(1, $tc->create(array( 'title' => 'unit_test', 'project_id' => 1, 'owner_id' => 1, @@ -152,7 +155,7 @@ class ActionTest extends Base $this->assertEquals(1, $t1['project_id']); // We move our task - $task->movePosition(1, 1, 4, 1); + $t->movePosition(1, 1, 4, 1); $this->assertTrue($this->container['event']->isEventTriggered(Task::EVENT_CLOSE)); $this->assertTrue($this->container['event']->isEventTriggered(Task::EVENT_MOVE_COLUMN)); |