Skip to content

Commit

Permalink
Using the correct IntlDateTimeFormatter pattern in test
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Oct 27, 2014
1 parent ac89d6a commit 86287d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/TestCase/I18n/TimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,19 +270,19 @@ public function testTimeAgoInWordsAccuracy() {
*/
public function testTimeAgoInWordsWithFormat() {
$time = new Time('2007-9-25');
$result = $time->timeAgoInWords(array('format' => 'YYYY-MM-dd'));
$result = $time->timeAgoInWords(array('format' => 'yyyy-MM-dd'));
$this->assertEquals('on 2007-09-25', $result);

$time = new Time('2007-9-25');
$result = $time->timeAgoInWords(array('format' => 'YYYY-MM-dd'));
$result = $time->timeAgoInWords(array('format' => 'yyyy-MM-dd'));
$this->assertEquals('on 2007-09-25', $result);

$time = new Time('+2 weeks +2 days');
$result = $time->timeAgoInWords(array('format' => 'YYYY-MM-dd'));
$result = $time->timeAgoInWords(array('format' => 'yyyy-MM-dd'));
$this->assertRegExp('/^2 weeks, [1|2] day(s)?$/', $result);

$time = new Time('+2 months +2 days');
$result = $time->timeAgoInWords(array('end' => '1 month', 'format' => 'YYYY-MM-dd'));
$result = $time->timeAgoInWords(array('end' => '1 month', 'format' => 'yyyy-MM-dd'));
$this->assertEquals('on ' . date('Y-m-d', strtotime('+2 months +2 days')), $result);
}

Expand Down

0 comments on commit 86287d2

Please sign in to comment.