Add unit test for transition model

This commit is contained in:
Frederic Guillot
2016-02-29 22:40:26 -05:00
parent fafc272085
commit 6ef83d0e05
35 changed files with 298 additions and 114 deletions

View File

@@ -2,6 +2,8 @@
namespace Kanboard\Controller;
use Kanboard\Core\DateParser;
/**
* Task controller
*
@@ -62,7 +64,7 @@ class Task extends Base
'time_spent' => $task['time_spent'] ?: '',
);
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', 'm/d/Y H:i'));
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', DateParser::DATE_TIME_FORMAT));
$this->response->html($this->helper->layout->task('task/show', array(
'project' => $this->project->getById($task['project_id']),

View File

@@ -2,6 +2,8 @@
namespace Kanboard\Controller;
use Kanboard\Core\DateParser;
/**
* Task Modification controller
*
@@ -83,8 +85,8 @@ class Taskmodification extends Base
$values = $this->hook->merge('controller:task-modification:form:default', $values, array('default_values' => $values));
}
$values = $this->dateParser->format($values, array('date_due'), $this->config->get('application_date_format', 'm/d/Y'));
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', 'm/d/Y H:i'));
$values = $this->dateParser->format($values, array('date_due'), $this->config->get('application_date_format', DateParser::DATE_FORMAT));
$values = $this->dateParser->format($values, array('date_started'), $this->config->get('application_datetime_format', DateParser::DATE_TIME_FORMAT));
$this->response->html($this->helper->layout->task('task_modification/edit_task', array(
'project' => $project,