summaryrefslogtreecommitdiff
path: root/tests/units/Action/TaskMoveColumnCategoryChangeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Action/TaskMoveColumnCategoryChangeTest.php')
-rw-r--r--tests/units/Action/TaskMoveColumnCategoryChangeTest.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/units/Action/TaskMoveColumnCategoryChangeTest.php b/tests/units/Action/TaskMoveColumnCategoryChangeTest.php
index 8783c679..c42383f8 100644
--- a/tests/units/Action/TaskMoveColumnCategoryChangeTest.php
+++ b/tests/units/Action/TaskMoveColumnCategoryChangeTest.php
@@ -3,21 +3,21 @@
require_once __DIR__.'/../Base.php';
use Kanboard\Event\GenericEvent;
-use Kanboard\Model\Category;
-use Kanboard\Model\Task;
-use Kanboard\Model\TaskFinder;
-use Kanboard\Model\TaskCreation;
-use Kanboard\Model\Project;
+use Kanboard\Model\CategoryModel;
+use Kanboard\Model\TaskModel;
+use Kanboard\Model\TaskFinderModel;
+use Kanboard\Model\TaskCreationModel;
+use Kanboard\Model\ProjectModel;
use Kanboard\Action\TaskMoveColumnCategoryChange;
class TaskMoveColumnCategoryChangeTest extends Base
{
public function testSuccess()
{
- $projectModel = new Project($this->container);
- $taskCreationModel = new TaskCreation($this->container);
- $taskFinderModel = new TaskFinder($this->container);
- $categoryModel = new Category($this->container);
+ $projectModel = new ProjectModel($this->container);
+ $taskCreationModel = new TaskCreationModel($this->container);
+ $taskFinderModel = new TaskFinderModel($this->container);
+ $categoryModel = new CategoryModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
@@ -31,7 +31,7 @@ class TaskMoveColumnCategoryChangeTest extends Base
$action->setParam('category_id', 1);
$action->setParam('dest_column_id', 2);
- $this->assertTrue($action->execute($event, Task::EVENT_UPDATE));
+ $this->assertTrue($action->execute($event, TaskModel::EVENT_UPDATE));
$task = $taskFinderModel->getById(1);
$this->assertNotEmpty($task);
@@ -41,9 +41,9 @@ class TaskMoveColumnCategoryChangeTest extends Base
public function testWithWrongColumn()
{
- $projectModel = new Project($this->container);
- $taskCreationModel = new TaskCreation($this->container);
- $categoryModel = new Category($this->container);
+ $projectModel = new ProjectModel($this->container);
+ $taskCreationModel = new TaskCreationModel($this->container);
+ $categoryModel = new CategoryModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
@@ -57,14 +57,14 @@ class TaskMoveColumnCategoryChangeTest extends Base
$action->setParam('category_id', 1);
$action->setParam('dest_column_id', 2);
- $this->assertFalse($action->execute($event, Task::EVENT_UPDATE));
+ $this->assertFalse($action->execute($event, TaskModel::EVENT_UPDATE));
}
public function testWithWrongCategory()
{
- $projectModel = new Project($this->container);
- $taskCreationModel = new TaskCreation($this->container);
- $categoryModel = new Category($this->container);
+ $projectModel = new ProjectModel($this->container);
+ $taskCreationModel = new TaskCreationModel($this->container);
+ $categoryModel = new CategoryModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
@@ -79,6 +79,6 @@ class TaskMoveColumnCategoryChangeTest extends Base
$action->setParam('category_id', 1);
$action->setParam('dest_column_id', 2);
- $this->assertFalse($action->execute($event, Task::EVENT_UPDATE));
+ $this->assertFalse($action->execute($event, TaskModel::EVENT_UPDATE));
}
}