fixes failing test cases from last CakeTime::timeAgoInWords changes

at b96eb1fb46
This commit is contained in:
Schlaefer 2014-10-01 11:09:00 +02:00
parent b96eb1fb46
commit 388e412a82
2 changed files with 2 additions and 2 deletions

View file

@ -175,7 +175,7 @@ class TimeHelperTest extends CakeTestCase {
'title' => $timestamp,
'class' => 'time-ago-in-words'
),
'2 weeks',
'in 2 weeks',
'/div'
);
$this->assertTags($result, $expected);

View file

@ -891,7 +891,7 @@ class CakeTime {
$accuracyNum = str_replace(array('year', 'month', 'week', 'day', 'hour', 'minute', 'second'), array(1, 2, 3, 4, 5, 6, 7), $accuracy);
$relativeDate = [];
$relativeDate = array();
if ($accuracyNum >= 1 && $years > 0) {
$relativeDate[] = __dn('cake', '%d year', '%d years', $years, $years);
}