Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix order for finds

This should solve more occasional errors in postgres on travis.
  • Loading branch information...
commit 0d298614239072f9a817f7b903d5472ef913b977 1 parent 587c707
@markstory markstory authored
Showing with 13 additions and 5 deletions.
  1. +13 −5 lib/Cake/Test/Case/Model/ModelReadTest.php
View
18 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -5400,7 +5400,9 @@ public function testNonNumericHabtmJoinKey() {
));
$Post->Tag->primaryKey = 'tag';
- $result = $Post->find('all');
+ $result = $Post->find('all', array(
+ 'order' => 'Post.id ASC',
+ ));
$expected = array(
array(
'Post' => array(
@@ -5615,7 +5617,9 @@ public function testHasManyLimitOptimization() {
$Project = new Project();
$Project->recursive = 3;
- $result = $Project->find('all');
+ $result = $Project->find('all', array(
+ 'order' => 'Project.id ASC',
+ ));
$expected = array(
array(
'Project' => array(
@@ -5729,7 +5733,9 @@ public function testFindAllRecursiveSelfJoin() {
$TestModel = new Home();
$TestModel->recursive = 2;
- $result = $TestModel->find('all');
+ $result = $TestModel->find('all', array(
+ 'order' => 'Home.id ASC',
+ ));
$expected = array(
array(
'Home' => array(
@@ -5842,7 +5848,9 @@ public function testFindAllRecursiveWithHabtm() {
$MyUser = new MyUser();
$MyUser->recursive = 2;
- $result = $MyUser->find('all');
+ $result = $MyUser->find('all', array(
+ 'order' => 'MyUser.id ASC'
+ ));
$expected = array(
array(
'MyUser' => array('id' => '1', 'firstname' => 'userA'),
@@ -6033,7 +6041,7 @@ public function testFindAllFakeThread() {
$fullDebug = $this->db->fullDebug;
$this->db->fullDebug = true;
$TestModel->recursive = 6;
- $result = $TestModel->find('all', null, null, 'CategoryThread.id ASC');
+ $result = $TestModel->find('all');
$expected = array(
array(
'CategoryThread' => array(
Please sign in to comment.
Something went wrong with that request. Please try again.