Skip to content

Commit

Permalink
fixes failing test cases from last CakeTime::timeAgoInWords changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlaefer committed Oct 1, 2014
1 parent b96eb1f commit 388e412
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
Expand Up @@ -175,7 +175,7 @@ public function testTimeAgoInWords() {
'title' => $timestamp,
'class' => 'time-ago-in-words'
),
'2 weeks',
'in 2 weeks',
'/div'
);
$this->assertTags($result, $expected);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/CakeTime.php
Expand Up @@ -891,7 +891,7 @@ public static function timeAgoInWords($dateTime, $options = array()) {

$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);
}
Expand Down

0 comments on commit 388e412

Please sign in to comment.