diff options
Diffstat (limited to 'tests/units/Model')
-rw-r--r-- | tests/units/Model/SubtaskTest.php | 2 | ||||
-rw-r--r-- | tests/units/Model/TaskCreationTest.php | 10 | ||||
-rw-r--r-- | tests/units/Model/TaskDuplicationTest.php | 8 | ||||
-rw-r--r-- | tests/units/Model/TaskExportTest.php | 1 | ||||
-rw-r--r-- | tests/units/Model/TaskPositionTest.php | 2 |
5 files changed, 10 insertions, 13 deletions
diff --git a/tests/units/Model/SubtaskTest.php b/tests/units/Model/SubtaskTest.php index ba57ab01..04b274cc 100644 --- a/tests/units/Model/SubtaskTest.php +++ b/tests/units/Model/SubtaskTest.php @@ -11,7 +11,7 @@ use Kanboard\Model\User; use Kanboard\Core\Session; use Kanboard\Model\UserSession; -class SubTaskTest extends Base +class SubtaskTest extends Base { public function onSubtaskCreated($event) { diff --git a/tests/units/Model/TaskCreationTest.php b/tests/units/Model/TaskCreationTest.php index ea0d32e6..d76937b2 100644 --- a/tests/units/Model/TaskCreationTest.php +++ b/tests/units/Model/TaskCreationTest.php @@ -28,8 +28,8 @@ class TaskCreationTest extends Base $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {}); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {}); $this->assertEquals(1, $p->create(array('name' => 'test'))); $this->assertEquals(0, $tc->create(array('title' => 'test', 'project_id' => 0))); @@ -45,8 +45,8 @@ class TaskCreationTest extends Base $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {}); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {}); $this->assertEquals(1, $p->create(array('name' => 'test'))); $this->assertEquals(1, $tc->create(array('project_id' => 1))); @@ -68,7 +68,7 @@ class TaskCreationTest extends Base $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {}); $this->container['dispatcher']->addListener(Task::EVENT_CREATE, array($this, 'onCreate')); $this->assertEquals(1, $p->create(array('name' => 'test'))); diff --git a/tests/units/Model/TaskDuplicationTest.php b/tests/units/Model/TaskDuplicationTest.php index 95c39308..5273928c 100644 --- a/tests/units/Model/TaskDuplicationTest.php +++ b/tests/units/Model/TaskDuplicationTest.php @@ -75,8 +75,8 @@ class TaskDuplicationTest extends Base $this->assertEquals(2, $task['category_id']); $this->assertEquals(4.4, $task['time_spent']); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {}); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {}); // We duplicate our task $this->assertEquals(2, $td->duplicate(1)); @@ -117,8 +117,8 @@ class TaskDuplicationTest extends Base // We create a task $this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1, 'column_id' => 2, 'owner_id' => 1, 'category_id' => 1))); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function() {}); - $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function() {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, function () {}); + $this->container['dispatcher']->addListener(Task::EVENT_CREATE, function () {}); // We duplicate our task to the 2nd project $this->assertEquals(2, $td->duplicateToProject(1, 2)); diff --git a/tests/units/Model/TaskExportTest.php b/tests/units/Model/TaskExportTest.php index f7f8e2eb..40b3a5a2 100644 --- a/tests/units/Model/TaskExportTest.php +++ b/tests/units/Model/TaskExportTest.php @@ -30,7 +30,6 @@ class TaskExportTest extends Base $this->assertNotFalse($c->create(array('name' => 'Category #3', 'project_id' => 1))); for ($i = 1; $i <= 100; $i++) { - $task = array( 'title' => 'Task #'.$i, 'project_id' => 1, diff --git a/tests/units/Model/TaskPositionTest.php b/tests/units/Model/TaskPositionTest.php index d1838d52..42612f44 100644 --- a/tests/units/Model/TaskPositionTest.php +++ b/tests/units/Model/TaskPositionTest.php @@ -272,9 +272,7 @@ class TaskPositionTest extends Base $task_per_column = 5; foreach (array(1, 2, 3, 4) as $column_id) { - for ($i = 1; $i <= $task_per_column; $i++, $counter++) { - $task = array( 'title' => 'Task #'.$i.'-'.$column_id, 'project_id' => 1, |