Properly using sort() before asserting values, asserting the result of sort() is cheating :P

This commit is contained in:
Jose Lorenzo Rodriguez 2011-12-10 10:38:24 -04:30
parent 1eb55bc201
commit cf03b33a0d

View file

@ -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();
}