Skip to content

Commit

Permalink
Fix Sqlite date functions tests - evaluate dates only without times
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladislav Gallay committed Jul 1, 2015
1 parent c39866e commit ea40bda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -2690,8 +2690,8 @@ function ($q) {
->fetchAll('assoc');
$result[0]['m'] = ltrim($result[0]['m'], '0');
$result[0]['me'] = ltrim($result[0]['me'], '0');
$result[0]['addDays'] = substr($result[0]['addDays'], 0, 19);
$result[0]['substractYears'] = substr($result[0]['substractYears'], 0, 19);
$result[0]['addDays'] = substr($result[0]['addDays'], 0, 10);
$result[0]['substractYears'] = substr($result[0]['substractYears'], 0, 10);
$expected = [
'd' => '18',
'm' => '3',
Expand All @@ -2701,8 +2701,8 @@ function ($q) {
'ye' => '2007',
'wd' => '1', // Sunday
'dow' => '1',
'addDays' => '2007-03-20 10:45:23',
'substractYears' => '2005-03-18 10:45:23'
'addDays' => '2007-03-20',
'substractYears' => '2005-03-18'
];
$this->assertEquals($expected, $result[0]);
}
Expand Down

0 comments on commit ea40bda

Please sign in to comment.