summaryrefslogtreecommitdiff
path: root/tests/units/Pagination/TaskPaginationTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-03-12 21:36:52 -0400
committerFrederic Guillot <fred@kanboard.net>2017-03-12 21:36:52 -0400
commit9b34631135f29480dda3ed2df463fbb5aab7c9e4 (patch)
tree46da2f342a440cc699b7aa9c61bd18d0d2ea01f5 /tests/units/Pagination/TaskPaginationTest.php
parentf6b42eb8024b7db959f6d75118b3de0f96301262 (diff)
Simplify dashboard to use new tasks list view
Diffstat (limited to 'tests/units/Pagination/TaskPaginationTest.php')
-rw-r--r--tests/units/Pagination/TaskPaginationTest.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/units/Pagination/TaskPaginationTest.php b/tests/units/Pagination/TaskPaginationTest.php
deleted file mode 100644
index 027212e2..00000000
--- a/tests/units/Pagination/TaskPaginationTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-use Kanboard\Model\ProjectModel;
-use Kanboard\Model\TaskCreationModel;
-use Kanboard\Model\TaskModel;
-use Kanboard\Pagination\TaskPagination;
-
-require_once __DIR__.'/../Base.php';
-
-class TaskPaginationTest extends Base
-{
- public function testDashboardPagination()
- {
- $taskCreationModel = new TaskCreationModel($this->container);
- $projectModel = new ProjectModel($this->container);
- $taskPagination = new TaskPagination($this->container);
-
- $this->assertEquals(1, $projectModel->create(array('name' => 'Project #1')));
- $this->assertEquals(1, $taskCreationModel->create(array('title' => 'Task #1', 'project_id' => 1)));
- $this->assertEquals(2, $taskCreationModel->create(array('title' => 'Task #2', 'project_id' => 1, 'column_id' => 2, 'owner_id' => 1)));
-
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->getCollection());
- $this->assertCount(0, $taskPagination->getDashboardPaginator(2, 'tasks', 5)->getCollection());
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->setOrder(TaskModel::TABLE.'.id')->getCollection());
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->setOrder('project_name')->getCollection());
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->setOrder(TaskModel::TABLE.'.title')->getCollection());
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->setOrder(TaskModel::TABLE.'.priority')->getCollection());
- $this->assertCount(1, $taskPagination->getDashboardPaginator(1, 'tasks', 5)->setOrder(TaskModel::TABLE.'.date_due')->getCollection());
- }
-}