Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Properly using sort() before asserting values, asserting the result o…

…f sort() is cheating :P
  • Loading branch information...
commit cf03b33a0dd260b97d60800ebf33a4995a997616 1 parent 1eb55bc
@lorenzo lorenzo authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Cake/Test/Case/Utility/FolderTest.php
View
8 lib/Cake/Test/Case/Utility/FolderTest.php
@@ -436,7 +436,9 @@ public function testFolderTreeWithHiddenFiles() {
);
$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 @@ public function testFolderTreeWithHiddenFiles() {
);
$result = $Folder->tree(null, true);
- $this->assertEquals(sort($expected), sort($result));
+ sort($result[1]);
+ sort($expected[1]);
+ $this->assertEquals($expected, $result);
$Folder->delete();
}
Please sign in to comment.
Something went wrong with that request. Please try again.