Skip to content

Commit

Permalink
Access niceFormat statically to fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrowe committed Nov 15, 2013
1 parent 7f8c569 commit 65ff15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cake/Test/TestCase/Utility/TimeTest.php
Expand Up @@ -393,11 +393,11 @@ public function testNice() {

$this->Time->niceFormat = '%Y-%d-%m';
$this->assertEquals(date('Y-d-m', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m', $this->Time->niceFormat);
$this->assertEquals('%Y-%d-%m', Time::$niceFormat);

Time::$niceFormat = '%Y-%d-%m %H:%M';
$this->assertEquals(date('Y-d-m H:i', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m %H:%M', $this->Time->niceFormat);
$this->assertEquals('%Y-%d-%m %H:%M', Time::$niceFormat);

date_default_timezone_set('UTC');
$result = $this->Time->nice(null, 'America/New_York');
Expand Down

0 comments on commit 65ff15c

Please sign in to comment.