mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Properly using sort() before asserting values, asserting the result of sort() is cheating :P
This commit is contained in:
parent
1eb55bc201
commit
cf03b33a0d
1 changed files with 6 additions and 2 deletions
|
@ -436,7 +436,9 @@ class FolderTest extends CakeTestCase {
|
|||
);
|
||||
|
||||
$result = $Folder->tree(null, false);
|
||||
$this->assertEquals(sort($expected), sort($result));
|
||||
sort($result[1]);
|
||||
sort($expected[1]);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$expected = array(
|
||||
array(
|
||||
|
@ -451,7 +453,9 @@ class FolderTest extends CakeTestCase {
|
|||
);
|
||||
|
||||
$result = $Folder->tree(null, true);
|
||||
$this->assertEquals(sort($expected), sort($result));
|
||||
sort($result[1]);
|
||||
sort($expected[1]);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$Folder->delete();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue