diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
commit | 14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch) | |
tree | 79972d53f6091a1ddb17f64a6a05a5523f5d5168 /tests/units/Action/TaskMoveColumnCategoryChangeTest.php | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'tests/units/Action/TaskMoveColumnCategoryChangeTest.php')
-rw-r--r-- | tests/units/Action/TaskMoveColumnCategoryChangeTest.php | 36 |
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)); } } |