diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-02-07 18:36:16 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-02-07 18:36:16 -0500 |
commit | fa6d19928abcfa03861e264222dbe46ad2fdc15a (patch) | |
tree | 598861577bba3a0a65e0bd47eecfb29f11f167ae | |
parent | f83fc5bee4b93f1209bce14d1d7eaa50fdc6870b (diff) |
Rename subtask model
-rw-r--r-- | app/Controller/App.php | 4 | ||||
-rw-r--r-- | app/Controller/Base.php | 4 | ||||
-rw-r--r-- | app/Controller/Board.php | 2 | ||||
-rw-r--r-- | app/Controller/Subtask.php | 30 | ||||
-rw-r--r-- | app/Controller/Task.php | 4 | ||||
-rw-r--r-- | app/Model/Base.php | 2 | ||||
-rw-r--r-- | app/Model/ProjectActivity.php | 4 | ||||
-rw-r--r-- | app/Model/Subtask.php (renamed from app/Model/SubTask.php) | 12 | ||||
-rw-r--r-- | app/Model/SubtaskExport.php | 8 | ||||
-rw-r--r-- | app/Model/SubtaskTimeTracking.php | 8 | ||||
-rw-r--r-- | app/Model/TaskDuplication.php | 2 | ||||
-rw-r--r-- | app/ServiceProvider/ClassProvider.php | 2 | ||||
-rw-r--r-- | app/Subscriber/Base.php | 2 | ||||
-rw-r--r-- | app/Subscriber/NotificationSubscriber.php | 12 | ||||
-rw-r--r-- | app/Subscriber/ProjectActivitySubscriber.php | 8 | ||||
-rw-r--r-- | app/Subscriber/SubtaskTimesheetSubscriber.php | 8 | ||||
-rw-r--r-- | jsonrpc.php | 14 | ||||
-rwxr-xr-x | scripts/create-random-tasks.php | 4 | ||||
-rw-r--r-- | tests/units/SubtaskTest.php | 4 | ||||
-rw-r--r-- | tests/units/TimeTrackingTest.php | 4 |
20 files changed, 69 insertions, 69 deletions
diff --git a/app/Controller/App.php b/app/Controller/App.php index 11e3915c..c4ed0fb8 100644 --- a/app/Controller/App.php +++ b/app/Controller/App.php @@ -2,7 +2,7 @@ namespace Controller; -use Model\SubTask as SubTaskModel; +use Model\Subtask as SubTaskModel; /** * Application controller @@ -55,7 +55,7 @@ class App extends Base ->setUrl('app', $action, array('pagination' => 'subtasks')) ->setMax(10) ->setOrder('tasks.id') - ->setQuery($this->subTask->getUserQuery($user_id, $status)) + ->setQuery($this->subtask->getUserQuery($user_id, $status)) ->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks'); $project_paginator = $this->paginator diff --git a/app/Controller/Base.php b/app/Controller/Base.php index d36e02c0..ac7e8907 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -40,7 +40,7 @@ use Symfony\Component\EventDispatcher\Event; * @property \Model\ProjectAnalytic $projectAnalytic * @property \Model\ProjectActivity $projectActivity * @property \Model\ProjectDailySummary $projectDailySummary - * @property \Model\SubTask $subTask + * @property \Model\Subtask $subtask * @property \Model\Swimlane $swimlane * @property \Model\Task $task * @property \Model\TaskCreation $taskCreation @@ -168,7 +168,7 @@ abstract class Base $this->handleAuthentication(); $this->handleAuthorization($controller, $action); - $this->session['has_subtask_inprogress'] = $this->subTask->hasSubtaskInProgress($this->userSession->getId()); + $this->session['has_subtask_inprogress'] = $this->subtask->hasSubtaskInProgress($this->userSession->getId()); } } diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 3671b5fc..c9622f86 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -410,7 +410,7 @@ class Board extends Base { $task = $this->getTask(); $this->response->html($this->template->render('board/subtasks', array( - 'subtasks' => $this->subTask->getAll($task['id']), + 'subtasks' => $this->subtask->getAll($task['id']), 'task' => $task, ))); } diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index a6cec435..c7ec00d1 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -2,10 +2,10 @@ namespace Controller; -use Model\SubTask as SubtaskModel; +use Model\Subtask as SubtaskModel; /** - * SubTask controller + * Subtask controller * * @package controller * @author Frederic Guillot @@ -20,7 +20,7 @@ class Subtask extends Base */ private function getSubtask() { - $subtask = $this->subTask->getById($this->request->getIntegerParam('subtask_id')); + $subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id')); if (! $subtask) { $this->notfound(); @@ -63,11 +63,11 @@ class Subtask extends Base $task = $this->getTask(); $values = $this->request->getValues(); - list($valid, $errors) = $this->subTask->validateCreation($values); + list($valid, $errors) = $this->subtask->validateCreation($values); if ($valid) { - if ($this->subTask->create($values)) { + if ($this->subtask->create($values)) { $this->session->flash(t('Sub-task added successfully.')); } else { @@ -98,7 +98,7 @@ class Subtask extends Base 'values' => empty($values) ? $subtask : $values, 'errors' => $errors, 'users_list' => $this->projectPermission->getMemberList($task['project_id']), - 'status_list' => $this->subTask->getStatusList(), + 'status_list' => $this->subtask->getStatusList(), 'subtask' => $subtask, 'task' => $task, ))); @@ -115,11 +115,11 @@ class Subtask extends Base $this->getSubtask(); $values = $this->request->getValues(); - list($valid, $errors) = $this->subTask->validateModification($values); + list($valid, $errors) = $this->subtask->validateModification($values); if ($valid) { - if ($this->subTask->update($values)) { + if ($this->subtask->update($values)) { $this->session->flash(t('Sub-task updated successfully.')); } else { @@ -159,7 +159,7 @@ class Subtask extends Base $task = $this->getTask(); $subtask = $this->getSubtask(); - if ($this->subTask->remove($subtask['id'])) { + if ($this->subtask->remove($subtask['id'])) { $this->session->flash(t('Sub-task removed successfully.')); } else { @@ -180,14 +180,14 @@ class Subtask extends Base $subtask = $this->getSubtask(); $redirect = $this->request->getStringParam('redirect', 'task'); - $this->subTask->toggleStatus($subtask['id']); + $this->subtask->toggleStatus($subtask['id']); if ($redirect === 'board') { - $this->session['has_subtask_inprogress'] = $this->subTask->hasSubtaskInProgress($this->userSession->getId()); + $this->session['has_subtask_inprogress'] = $this->subtask->hasSubtaskInProgress($this->userSession->getId()); $this->response->html($this->template->render('board/subtasks', array( - 'subtasks' => $this->subTask->getAll($task['id']), + 'subtasks' => $this->subtask->getAll($task['id']), 'task' => $task, ))); } @@ -210,7 +210,7 @@ class Subtask extends Base SubtaskModel::STATUS_TODO => t('Todo'), SubtaskModel::STATUS_DONE => t('Done'), ), - 'subtask_inprogress' => $this->subTask->getSubtaskInProgress($this->userSession->getId()), + 'subtask_inprogress' => $this->subtask->getSubtaskInProgress($this->userSession->getId()), 'subtask' => $subtask, 'task' => $task, 'redirect' => $this->request->getStringParam('redirect'), @@ -229,13 +229,13 @@ class Subtask extends Base $values = $this->request->getValues(); // Change status of the previous in progress subtask - $this->subTask->update(array( + $this->subtask->update(array( 'id' => $values['id'], 'status' => $values['status'], )); // Set the current subtask to in pogress - $this->subTask->update(array( + $this->subtask->update(array( 'id' => $subtask['id'], 'status' => SubtaskModel::STATUS_INPROGRESS, )); diff --git a/app/Controller/Task.php b/app/Controller/Task.php index 205e480f..626ac9e6 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -35,7 +35,7 @@ class Task extends Base $this->response->html($this->template->layout('task/public', array( 'project' => $project, 'comments' => $this->comment->getAll($task['id']), - 'subtasks' => $this->subTask->getAll($task['id']), + 'subtasks' => $this->subtask->getAll($task['id']), 'task' => $task, 'columns_list' => $this->board->getColumnsList($task['project_id']), 'colors_list' => $this->color->getList(), @@ -54,7 +54,7 @@ class Task extends Base public function show() { $task = $this->getTask(); - $subtasks = $this->subTask->getAll($task['id']); + $subtasks = $this->subtask->getAll($task['id']); $values = array( 'id' => $task['id'], diff --git a/app/Model/Base.php b/app/Model/Base.php index e29588a2..cf5f2e9f 100644 --- a/app/Model/Base.php +++ b/app/Model/Base.php @@ -29,7 +29,7 @@ use Pimple\Container; * @property \Model\Project $project * @property \Model\ProjectDuplication $projectDuplication * @property \Model\ProjectPermission $projectPermission - * @property \Model\SubTask $subTask + * @property \Model\Subtask $subtask * @property \Model\SubtaskHistory $subtaskHistory * @property \Model\Swimlane $swimlane * @property \Model\Task $task diff --git a/app/Model/ProjectActivity.php b/app/Model/ProjectActivity.php index a046dffb..8ef35a97 100644 --- a/app/Model/ProjectActivity.php +++ b/app/Model/ProjectActivity.php @@ -162,9 +162,9 @@ class ProjectActivity extends Base return t('%s moved the task #%d to the column "%s"', $event['author'], $event['task']['id'], $event['task']['column_title']); case Task::EVENT_MOVE_POSITION: return t('%s moved the task #%d to the position %d in the column "%s"', $event['author'], $event['task']['id'], $event['task']['position'], $event['task']['column_title']); - case SubTask::EVENT_UPDATE: + case Subtask::EVENT_UPDATE: return t('%s updated a subtask for the task #%d', $event['author'], $event['task']['id']); - case SubTask::EVENT_CREATE: + case Subtask::EVENT_CREATE: return t('%s created a subtask for the task #%d', $event['author'], $event['task']['id']); case Comment::EVENT_UPDATE: return t('%s updated a comment on the task #%d', $event['author'], $event['task']['id']); diff --git a/app/Model/SubTask.php b/app/Model/Subtask.php index dd243b1f..9ecd2c6a 100644 --- a/app/Model/SubTask.php +++ b/app/Model/Subtask.php @@ -12,7 +12,7 @@ use SimpleValidator\Validators; * @package model * @author Frederic Guillot */ -class SubTask extends Base +class Subtask extends Base { /** * SQL table name @@ -93,16 +93,16 @@ class SubTask extends Base */ public function getUserQuery($user_id, array $status) { - return $this->db->table(SubTask::TABLE) + return $this->db->table(Subtask::TABLE) ->columns( - SubTask::TABLE.'.*', + Subtask::TABLE.'.*', Task::TABLE.'.project_id', Task::TABLE.'.color_id', Project::TABLE.'.name AS project_name' ) ->eq('user_id', $user_id) ->eq(Project::TABLE.'.is_active', Project::ACTIVE) - ->in(SubTask::TABLE.'.status', $status) + ->in(Subtask::TABLE.'.status', $status) ->join(Task::TABLE, 'id', 'task_id') ->join(Project::TABLE, 'id', 'project_id', Task::TABLE) ->filter(array($this, 'addStatusName')); @@ -283,7 +283,7 @@ class SubTask extends Base { return $this->db->transaction(function ($db) use ($src_task_id, $dst_task_id) { - $subtasks = $db->table(SubTask::TABLE) + $subtasks = $db->table(Subtask::TABLE) ->columns('title', 'time_estimated') ->eq('task_id', $src_task_id) ->asc('id') // Explicit sorting for postgresql @@ -293,7 +293,7 @@ class SubTask extends Base $subtask['task_id'] = $dst_task_id; - if (! $db->table(SubTask::TABLE)->save($subtask)) { + if (! $db->table(Subtask::TABLE)->save($subtask)) { return false; } } diff --git a/app/Model/SubtaskExport.php b/app/Model/SubtaskExport.php index 1e728c05..23dcc019 100644 --- a/app/Model/SubtaskExport.php +++ b/app/Model/SubtaskExport.php @@ -29,7 +29,7 @@ class SubtaskExport extends Base */ public function export($project_id, $from, $to) { - $this->subtask_status = $this->subTask->getStatusList(); + $this->subtask_status = $this->subtask->getStatusList(); $subtasks = $this->getSubtasks($project_id, $from, $to); $results = array($this->getColumns()); @@ -101,10 +101,10 @@ class SubtaskExport extends Base $to = $this->dateParser->removeTimeFromTimestamp(strtotime('+1 day', $this->dateParser->getTimestamp($to))); } - return $this->db->table(SubTask::TABLE) + return $this->db->table(Subtask::TABLE) ->eq('project_id', $project_id) ->columns( - SubTask::TABLE.'.*', + Subtask::TABLE.'.*', User::TABLE.'.username AS assignee_username', User::TABLE.'.name AS assignee_name', Task::TABLE.'.title AS task_title' @@ -113,7 +113,7 @@ class SubtaskExport extends Base ->lte('date_creation', $to) ->join(Task::TABLE, 'id', 'task_id') ->join(User::TABLE, 'id', 'user_id') - ->asc(SubTask::TABLE.'.id') + ->asc(Subtask::TABLE.'.id') ->findAll(); } } diff --git a/app/Model/SubtaskTimeTracking.php b/app/Model/SubtaskTimeTracking.php index 5c8a7c81..cc839ddb 100644 --- a/app/Model/SubtaskTimeTracking.php +++ b/app/Model/SubtaskTimeTracking.php @@ -33,13 +33,13 @@ class SubtaskTimeTracking extends Base self::TABLE.'.subtask_id', self::TABLE.'.end', self::TABLE.'.start', - SubTask::TABLE.'.task_id', - SubTask::TABLE.'.title AS subtask_title', + Subtask::TABLE.'.task_id', + Subtask::TABLE.'.title AS subtask_title', Task::TABLE.'.title AS task_title', Task::TABLE.'.project_id' ) - ->join(SubTask::TABLE, 'id', 'subtask_id') - ->join(Task::TABLE, 'id', 'task_id', SubTask::TABLE) + ->join(Subtask::TABLE, 'id', 'subtask_id') + ->join(Task::TABLE, 'id', 'task_id', Subtask::TABLE) ->eq(self::TABLE.'.user_id', $user_id); } diff --git a/app/Model/TaskDuplication.php b/app/Model/TaskDuplication.php index 172edb9f..bd593dc1 100644 --- a/app/Model/TaskDuplication.php +++ b/app/Model/TaskDuplication.php @@ -158,7 +158,7 @@ class TaskDuplication extends Base $new_task_id = $this->taskCreation->create($values); if ($new_task_id) { - $this->subTask->duplicate($task_id, $new_task_id); + $this->subtask->duplicate($task_id, $new_task_id); } return $new_task_id; diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php index e8b3386a..48157991 100644 --- a/app/ServiceProvider/ClassProvider.php +++ b/app/ServiceProvider/ClassProvider.php @@ -31,7 +31,7 @@ class ClassProvider implements ServiceProviderInterface 'ProjectDuplication', 'ProjectDailySummary', 'ProjectPermission', - 'SubTask', + 'Subtask', 'SubtaskExport', 'SubtaskTimeTracking', 'Swimlane', diff --git a/app/Subscriber/Base.php b/app/Subscriber/Base.php index 4616b179..19f41c84 100644 --- a/app/Subscriber/Base.php +++ b/app/Subscriber/Base.php @@ -18,7 +18,7 @@ use Pimple\Container; * @property \Model\ProjectPermission $projectPermission * @property \Model\ProjectAnalytic $projectAnalytic * @property \Model\ProjectDailySummary $projectDailySummary - * @property \Model\SubTask $subTask + * @property \Model\Subtask $subtask * @property \Model\Task $task * @property \Model\TaskExport $taskExport * @property \Model\TaskFinder $taskFinder diff --git a/app/Subscriber/NotificationSubscriber.php b/app/Subscriber/NotificationSubscriber.php index 1580f6dc..1b7187fe 100644 --- a/app/Subscriber/NotificationSubscriber.php +++ b/app/Subscriber/NotificationSubscriber.php @@ -5,7 +5,7 @@ namespace Subscriber; use Event\GenericEvent; use Model\Task; use Model\Comment; -use Model\SubTask; +use Model\Subtask; use Model\File; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -19,8 +19,8 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface Task::EVENT_MOVE_COLUMN => 'task_move_column', Task::EVENT_MOVE_POSITION => 'task_move_position', Task::EVENT_ASSIGNEE_CHANGE => 'task_assignee_change', - SubTask::EVENT_CREATE => 'subtask_creation', - SubTask::EVENT_UPDATE => 'subtask_update', + Subtask::EVENT_CREATE => 'subtask_creation', + Subtask::EVENT_UPDATE => 'subtask_update', Comment::EVENT_CREATE => 'comment_creation', Comment::EVENT_UPDATE => 'comment_update', File::EVENT_CREATE => 'file_creation', @@ -36,8 +36,8 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface Task::EVENT_MOVE_COLUMN => array('execute', 0), Task::EVENT_MOVE_POSITION => array('execute', 0), Task::EVENT_ASSIGNEE_CHANGE => array('execute', 0), - SubTask::EVENT_CREATE => array('execute', 0), - SubTask::EVENT_UPDATE => array('execute', 0), + Subtask::EVENT_CREATE => array('execute', 0), + Subtask::EVENT_UPDATE => array('execute', 0), Comment::EVENT_CREATE => array('execute', 0), Comment::EVENT_UPDATE => array('execute', 0), File::EVENT_CREATE => array('execute', 0), @@ -63,7 +63,7 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface $values['task'] = $this->taskFinder->getDetails($event['task_id']); break; case 'Event\SubtaskEvent': - $values['subtask'] = $this->subTask->getById($event['id'], true); + $values['subtask'] = $this->subtask->getById($event['id'], true); $values['task'] = $this->taskFinder->getDetails($event['task_id']); break; case 'Event\FileEvent': diff --git a/app/Subscriber/ProjectActivitySubscriber.php b/app/Subscriber/ProjectActivitySubscriber.php index aae09ae2..00f5b044 100644 --- a/app/Subscriber/ProjectActivitySubscriber.php +++ b/app/Subscriber/ProjectActivitySubscriber.php @@ -5,7 +5,7 @@ namespace Subscriber; use Event\GenericEvent; use Model\Task; use Model\Comment; -use Model\SubTask; +use Model\Subtask; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class ProjectActivitySubscriber extends Base implements EventSubscriberInterface @@ -22,8 +22,8 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface Task::EVENT_MOVE_POSITION => array('execute', 0), Comment::EVENT_UPDATE => array('execute', 0), Comment::EVENT_CREATE => array('execute', 0), - SubTask::EVENT_UPDATE => array('execute', 0), - SubTask::EVENT_CREATE => array('execute', 0), + Subtask::EVENT_UPDATE => array('execute', 0), + Subtask::EVENT_CREATE => array('execute', 0), ); } @@ -51,7 +51,7 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface switch (get_class($event)) { case 'Event\SubtaskEvent': - $values['subtask'] = $this->subTask->getById($event['id'], true); + $values['subtask'] = $this->subtask->getById($event['id'], true); break; case 'Event\CommentEvent': $values['comment'] = $this->comment->getById($event['id']); diff --git a/app/Subscriber/SubtaskTimesheetSubscriber.php b/app/Subscriber/SubtaskTimesheetSubscriber.php index 687db80a..df10fc43 100644 --- a/app/Subscriber/SubtaskTimesheetSubscriber.php +++ b/app/Subscriber/SubtaskTimesheetSubscriber.php @@ -3,7 +3,7 @@ namespace Subscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Model\SubTask; +use Model\Subtask; use Event\SubtaskEvent; class SubtaskTimesheetSubscriber extends Base implements EventSubscriberInterface @@ -11,7 +11,7 @@ class SubtaskTimesheetSubscriber extends Base implements EventSubscriberInterfac public static function getSubscribedEvents() { return array( - SubTask::EVENT_UPDATE => array('log', 0), + Subtask::EVENT_UPDATE => array('log', 0), ); } @@ -19,9 +19,9 @@ class SubtaskTimesheetSubscriber extends Base implements EventSubscriberInterfac { if (isset($event['status'])) { - $subtask = $this->subTask->getById($event['id']); + $subtask = $this->subtask->getById($event['id']); - if ($subtask['status'] == SubTask::STATUS_INPROGRESS) { + if ($subtask['status'] == Subtask::STATUS_INPROGRESS) { $this->subtaskTimeTracking->logStartTime($subtask['id'], $subtask['user_id']); } else { diff --git a/jsonrpc.php b/jsonrpc.php index 0b71af10..6530e73a 100644 --- a/jsonrpc.php +++ b/jsonrpc.php @@ -271,9 +271,9 @@ $server->register('updateComment', function($id, $content) use ($container) { /** * Subtask procedures */ -$server->bind('getSubtask', $container['subTask'], 'getById'); -$server->bind('getAllSubtasks', $container['subTask'], 'getAll'); -$server->bind('removeSubtask', $container['subTask'], 'remove'); +$server->bind('getSubtask', $container['subtask'], 'getById'); +$server->bind('getAllSubtasks', $container['subtask'], 'getAll'); +$server->bind('removeSubtask', $container['subtask'], 'remove'); $server->register('createSubtask', function($task_id, $title, $user_id = 0, $time_estimated = 0, $time_spent = 0, $status = 0) use ($container) { @@ -291,13 +291,13 @@ $server->register('createSubtask', function($task_id, $title, $user_id = 0, $tim unset($values[$key]); } } - list($valid,) = $container['subTask']->validateCreation($values); + list($valid,) = $container['subtask']->validateCreation($values); if (! $valid) { return false; } - return $container['subTask']->create($values); + return $container['subtask']->create($values); }); $server->register('updateSubtask', function($id, $task_id, $title = null, $user_id = null, $time_estimated = null, $time_spent = null, $status = null) use ($container) { @@ -318,8 +318,8 @@ $server->register('updateSubtask', function($id, $task_id, $title = null, $user_ } } - list($valid,) = $container['subTask']->validateApiModification($values); - return $valid && $container['subTask']->update($values); + list($valid,) = $container['subtask']->validateApiModification($values); + return $valid && $container['subtask']->update($values); }); /** diff --git a/scripts/create-random-tasks.php b/scripts/create-random-tasks.php index aa6044b8..203c414d 100755 --- a/scripts/create-random-tasks.php +++ b/scripts/create-random-tasks.php @@ -4,7 +4,7 @@ require __DIR__.'/../app/common.php'; use Model\TaskCreation; -use Model\SubTask; +use Model\Subtask; use Model\Project; use Model\ProjectPermission; use Model\User; @@ -15,7 +15,7 @@ $userModel = new User($container); $projectModel = new Project($container); $permissionModel = new ProjectPermission($container); $taskModel = new TaskCreation($container); -$subtaskModel = new SubTask($container); +$subtaskModel = new Subtask($container); $project_id = $projectModel->create(array( 'name' => 'Project #1' diff --git a/tests/units/SubtaskTest.php b/tests/units/SubtaskTest.php index 1f6ad8ab..62475186 100644 --- a/tests/units/SubtaskTest.php +++ b/tests/units/SubtaskTest.php @@ -4,7 +4,7 @@ require_once __DIR__.'/Base.php'; use Model\Task; use Model\TaskCreation; -use Model\SubTask; +use Model\Subtask; use Model\Project; use Model\Category; use Model\User; @@ -14,7 +14,7 @@ class SubTaskTest extends Base public function testDuplicate() { $tc = new TaskCreation($this->container); - $s = new SubTask($this->container); + $s = new Subtask($this->container); $p = new Project($this->container); // We create a project diff --git a/tests/units/TimeTrackingTest.php b/tests/units/TimeTrackingTest.php index 6cf28eee..447f1c96 100644 --- a/tests/units/TimeTrackingTest.php +++ b/tests/units/TimeTrackingTest.php @@ -2,7 +2,7 @@ require_once __DIR__.'/Base.php'; -use Model\SubTask; +use Model\Subtask; use Model\TaskModification; use Model\TaskCreation; use Model\TaskFinder; @@ -17,7 +17,7 @@ class TimeTrackingTest extends Base $tc = new TaskCreation($this->container); $tf = new TaskFinder($this->container); $p = new Project($this->container); - $s = new SubTask($this->container); + $s = new Subtask($this->container); $ts = new TimeTracking($this->container); $this->assertEquals(1, $p->create(array('name' => 'Project #1'))); |