mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fix order for finds
This should solve more occasional errors in postgres on travis.
This commit is contained in:
parent
587c7071b4
commit
0d29861423
1 changed files with 13 additions and 5 deletions
|
@ -5400,7 +5400,9 @@ class ModelReadTest extends BaseModelTest {
|
|||
));
|
||||
$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 @@ class ModelReadTest extends BaseModelTest {
|
|||
$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 @@ class ModelReadTest extends BaseModelTest {
|
|||
$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 @@ class ModelReadTest extends BaseModelTest {
|
|||
$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 @@ class ModelReadTest extends BaseModelTest {
|
|||
$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(
|
||||
|
|
Loading…
Reference in a new issue