From 36a51bdad5e7d21177b8fdbb3470399f9a73367c Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 6 May 2013 22:03:45 +0530 Subject: [PATCH] Avoid fail due to postgres ordering --- .../Case/Controller/Component/PaginatorComponentTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index f660ecd9074..e4e72a4699b 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -891,7 +891,7 @@ public function testOutOfRangePageNumberGetsClamped() { /** * Test that a really REALLY large page number gets clamped to the max page size. - * + * * * @expectedException NotFoundException * @return void @@ -1138,7 +1138,9 @@ public function testPaginateOrderVirtualFieldSharedWithRealField() { ); $Controller->passedArgs = array('sort' => 'PaginatorControllerPost.title', 'dir' => 'asc'); $result = $Controller->paginate('PaginatorControllerComment'); - $this->assertEquals(array(1, 2, 3, 4, 5, 6), Hash::extract($result, '{n}.PaginatorControllerComment.id')); + $result = Hash::extract($result, '{n}.PaginatorControllerComment.id'); + sort($result); + $this->assertEquals(array(1, 2, 3, 4, 5, 6), $result); } /**