Rename all models
This commit is contained in:
@@ -3,19 +3,19 @@
|
||||
require_once __DIR__.'/../Base.php';
|
||||
|
||||
use Kanboard\Event\GenericEvent;
|
||||
use Kanboard\Model\Task;
|
||||
use Kanboard\Model\TaskFinder;
|
||||
use Kanboard\Model\TaskCreation;
|
||||
use Kanboard\Model\Project;
|
||||
use Kanboard\Model\TaskModel;
|
||||
use Kanboard\Model\TaskFinderModel;
|
||||
use Kanboard\Model\TaskCreationModel;
|
||||
use Kanboard\Model\ProjectModel;
|
||||
use Kanboard\Action\TaskMoveColumnUnAssigned;
|
||||
|
||||
class TaskMoveColumnUnAssignedTest extends Base
|
||||
{
|
||||
public function testSuccess()
|
||||
{
|
||||
$projectModel = new Project($this->container);
|
||||
$taskCreationModel = new TaskCreation($this->container);
|
||||
$taskFinderModel = new TaskFinder($this->container);
|
||||
$projectModel = new ProjectModel($this->container);
|
||||
$taskCreationModel = new TaskCreationModel($this->container);
|
||||
$taskFinderModel = new TaskFinderModel($this->container);
|
||||
|
||||
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
|
||||
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
|
||||
@@ -28,7 +28,7 @@ class TaskMoveColumnUnAssignedTest extends Base
|
||||
$action->setParam('src_column_id', 1);
|
||||
$action->setParam('dest_column_id', 2);
|
||||
|
||||
$this->assertTrue($action->execute($event, Task::EVENT_ASSIGNEE_CHANGE));
|
||||
$this->assertTrue($action->execute($event, TaskModel::EVENT_ASSIGNEE_CHANGE));
|
||||
|
||||
$task = $taskFinderModel->getById(1);
|
||||
$this->assertNotEmpty($task);
|
||||
@@ -38,7 +38,7 @@ class TaskMoveColumnUnAssignedTest extends Base
|
||||
|
||||
public function testWithWrongColumn()
|
||||
{
|
||||
$projectModel = new Project($this->container);
|
||||
$projectModel = new ProjectModel($this->container);
|
||||
|
||||
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
|
||||
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
|
||||
@@ -50,12 +50,12 @@ class TaskMoveColumnUnAssignedTest extends Base
|
||||
$action->setParam('src_column_id', 1);
|
||||
$action->setParam('dest_column_id', 2);
|
||||
|
||||
$this->assertFalse($action->execute($event, Task::EVENT_ASSIGNEE_CHANGE));
|
||||
$this->assertFalse($action->execute($event, TaskModel::EVENT_ASSIGNEE_CHANGE));
|
||||
}
|
||||
|
||||
public function testWithWrongUser()
|
||||
{
|
||||
$projectModel = new Project($this->container);
|
||||
$projectModel = new ProjectModel($this->container);
|
||||
|
||||
$this->assertEquals(1, $projectModel->create(array('name' => 'test1')));
|
||||
$this->assertEquals(2, $projectModel->create(array('name' => 'test2')));
|
||||
@@ -67,6 +67,6 @@ class TaskMoveColumnUnAssignedTest extends Base
|
||||
$action->setParam('src_column_id', 1);
|
||||
$action->setParam('dest_column_id', 2);
|
||||
|
||||
$this->assertFalse($action->execute($event, Task::EVENT_ASSIGNEE_CHANGE));
|
||||
$this->assertFalse($action->execute($event, TaskModel::EVENT_ASSIGNEE_CHANGE));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user