diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index 7b2a19865..39a97f6e1 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -394,9 +394,9 @@ class PaginatorComponentTest extends CakeTestCase { $this->assertEquals(array(3, 2, 1), $results); $Controller->request->params['named'] = array('sort' => 'NotExisting.field', 'direction' => 'desc'); - $results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id'); - $this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page'], 'Invalid field in query %s'); - $this->assertEquals(array(1, 2, 3), $results); + $Controller->Paginator->paginate('PaginatorControllerPost'); + $this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']); + $this->assertEquals(array(), $Controller->PaginatorControllerPost->lastQueries[1]['order'][0], 'no order should be set.'); $Controller->request->params['named'] = array( 'sort' => 'PaginatorControllerPost.author_id', 'direction' => 'allYourBase'