mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-06-05 14:23:36 +00:00
Correcting assertEquals parameter order
This commit is contained in:
parent
645ef47878
commit
b46c4b3e3f
6 changed files with 17 additions and 17 deletions
lib/Cake/Test/Case/Model
|
@ -7561,7 +7561,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
'2' => 'Second Post',
|
||||
'1' => 'First Post'
|
||||
);
|
||||
$this->assertEquals($result, $expected);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $Post->find('list', array('order' => array('Post.other_field' => 'DESC')));
|
||||
$expected = array(
|
||||
|
@ -7569,23 +7569,23 @@ class ModelReadTest extends BaseModelTest {
|
|||
'2' => 'Second Post',
|
||||
'3' => 'Third Post'
|
||||
);
|
||||
$this->assertEquals($result, $expected);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$Post->Author->virtualFields = array('joined' => 'Post.id * Author.id');
|
||||
$result = $Post->find('all');
|
||||
$result = Set::extract('{n}.Author.joined', $result);
|
||||
$expected = array(1, 6, 3);
|
||||
$this->assertEquals($result, $expected);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $Post->find('all', array('order' => array('Author.joined' => 'ASC')));
|
||||
$result = Set::extract('{n}.Author.joined', $result);
|
||||
$expected = array(1, 3, 6);
|
||||
$this->assertEquals($result, $expected);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $Post->find('all', array('order' => array('Author.joined' => 'DESC')));
|
||||
$result = Set::extract('{n}.Author.joined', $result);
|
||||
$expected = array(6, 3, 1);
|
||||
$this->assertEquals($result, $expected);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue