Skip to content
Browse files

Merge branch 'master' into 2.3

  • Loading branch information...
2 parents b75bb8e + d9a3ab8 commit 478461d3012ad7894ea4945c8a9cb1f733365ec5 @markstory markstory committed Oct 28, 2012
Showing with 8 additions and 5 deletions.
  1. +4 −1 lib/Cake/Test/Case/Model/ModelReadTest.php
  2. +4 −4 lib/Cake/Test/Case/Utility/CakeTimeTest.php
View
5 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -5030,6 +5030,7 @@ public function testAssociationAfterFind() {
)));
$result = $Author->find('all', array(
'conditions' => array('Author.id' => 1),
+ 'order' => array('Author.id' => 'ASC'),
'recursive' => 2
));
$expected = array(
@@ -7760,7 +7761,9 @@ public function testVirtualFieldsOrder() {
$this->assertEquals($expected, $result);
$Post->Author->virtualFields = array('joined' => 'Post.id * Author.id');
- $result = $Post->find('all');
+ $result = $Post->find('all', array(
+ 'order' => array('Post.id' => 'ASC')
+ ));
$result = Hash::extract($result, '{n}.Author.joined');
$expected = array(1, 6, 3);
$this->assertEquals($expected, $result);
View
8 lib/Cake/Test/Case/Utility/CakeTimeTest.php
@@ -340,14 +340,14 @@ public function testNice() {
$this->assertEquals(date('Y-d-m', $time), $this->Time->nice($time));
$this->assertEquals('%Y-%d-%m', $this->Time->niceFormat);
- CakeTime::$niceFormat = '%Y-%d-%m %H:%M:%S';
- $this->assertEquals(date('Y-d-m H:i:s', $time), $this->Time->nice($time));
- $this->assertEquals('%Y-%d-%m %H:%M:%S', $this->Time->niceFormat);
+ CakeTime::$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);
date_default_timezone_set('UTC');
$result = $this->Time->nice(null, 'America/New_York');
$expected = $this->Time->nice(time(), 'America/New_York');
- $this->assertEquals($expected, $result);
+ $this->assertEquals(substr($expected, 0, -1), substr($result, 0, -1));
$this->_restoreSystemTimezone();
}

0 comments on commit 478461d

Please sign in to comment.
Something went wrong with that request. Please try again.