summaryrefslogtreecommitdiff
path: root/tests/units/TaskModificationTest.php
diff options
context:
space:
mode:
authorLesstat <florianbarth@gmx.de>2015-07-11 11:44:26 +0200
committerLesstat <florianbarth@gmx.de>2015-07-11 11:44:26 +0200
commita85a1c613239c20fe72eb96c2921f4c220ec156b (patch)
treed032b4591e518cbbbfaa8886f8f5d98a6ea2efb7 /tests/units/TaskModificationTest.php
parent5101eaa8060ce3c75a81a26f6e47aae40e3d4ac3 (diff)
parent7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff)
Merged branch 'master' of https://github.com/fguillot/kanboard
only imports conflicted
Diffstat (limited to 'tests/units/TaskModificationTest.php')
-rw-r--r--tests/units/TaskModificationTest.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/units/TaskModificationTest.php b/tests/units/TaskModificationTest.php
index e6d8f8dc..4dd89c5e 100644
--- a/tests/units/TaskModificationTest.php
+++ b/tests/units/TaskModificationTest.php
@@ -202,15 +202,29 @@ class TaskModificationTest extends Base
$task = $tf->getById(1);
$this->assertEquals(0, $task['date_started']);
+ // Set only a date
$this->assertTrue($tm->update(array('id' => 1, 'date_started' => '2014-11-24')));
$task = $tf->getById(1);
- $this->assertEquals('2014-11-24', date('Y-m-d', $task['date_started']));
+ $this->assertEquals('2014-11-24 '.date('H:i'), date('Y-m-d H:i', $task['date_started']));
+ // Set a datetime
+ $this->assertTrue($tm->update(array('id' => 1, 'date_started' => '2014-11-24 16:25')));
+
+ $task = $tf->getById(1);
+ $this->assertEquals('2014-11-24 16:25', date('Y-m-d H:i', $task['date_started']));
+
+ // Set a datetime
+ $this->assertTrue($tm->update(array('id' => 1, 'date_started' => '2014-11-24 6:25pm')));
+
+ $task = $tf->getById(1);
+ $this->assertEquals('2014-11-24 18:25', date('Y-m-d H:i', $task['date_started']));
+
+ // Set a timestamp
$this->assertTrue($tm->update(array('id' => 1, 'date_started' => time())));
$task = $tf->getById(1);
- $this->assertEquals(date('Y-m-d'), date('Y-m-d', $task['date_started']));
+ $this->assertEquals(time(), $task['date_started'], '', 1);
}
public function testChangeTimeEstimated()