From ce3aa692b50b4239e32a58a250d4a7c8f0afca21 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Nov 2012 18:06:59 -0400 Subject: [PATCH] Use set order for test that failed on travis. --- lib/Cake/Test/Case/Model/ModelReadTest.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index e0afbd1b4..8780d7b80 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -4203,7 +4203,8 @@ class ModelReadTest extends BaseModelTest { $this->assertTrue($result); $result = $TestModel->find('all', array( - 'fields' => 'User.id, User.user' + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), )); $expected = array( array( @@ -4296,7 +4297,8 @@ class ModelReadTest extends BaseModelTest { $this->assertTrue($result); $result = $TestModel->find('all', array( - 'fields' => 'User.id, User.user' + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), )); $expected = array( @@ -4407,7 +4409,8 @@ class ModelReadTest extends BaseModelTest { $this->assertEquals($expected, $result); $result = $TestModel->find('all', array( - 'fields' => 'User.id, User.user' + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), )); $expected = array( array('User' => array('id' => '1', 'user' => 'mariano')), @@ -4417,7 +4420,8 @@ class ModelReadTest extends BaseModelTest { $this->assertEquals($expected, $result); $result = $TestModel->find('all', array( - 'fields' => 'User.id, User.user' + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), )); $expected = array( array( @@ -4505,7 +4509,10 @@ class ModelReadTest extends BaseModelTest { $result = $TestModel->unbindModel(array('hasMany' => array('Comment')), false); $this->assertTrue($result); - $result = $TestModel->find('all', array('fields' => 'User.id, User.user')); + $result = $TestModel->find('all', array( + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), + )); $expected = array( array('User' => array('id' => '1', 'user' => 'mariano')), array('User' => array('id' => '2', 'user' => 'nate')), @@ -4522,7 +4529,10 @@ class ModelReadTest extends BaseModelTest { ))); $this->assertTrue($result); - $result = $TestModel->find('all', array('fields' => 'User.id, User.user')); + $result = $TestModel->find('all', array( + 'fields' => 'User.id, User.user', + 'order' => array('User.id' => 'ASC'), + )); $expected = array( array( 'User' => array(