Skip to content

Commit

Permalink
Add additional tests for pagination + conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 21, 2014
1 parent a56ae18 commit ace3754
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/TestCase/Database/Driver/SqlserverTest.php
Expand Up @@ -200,11 +200,12 @@ public function testSelectLimitOldServer() {
$query->select(['id', 'title'])
->from('articles')
->order(['id'])
->where(['title' => 'Something'])
->limit(10)
->offset(50);
$expected = 'SELECT * FROM (SELECT id, title, (ROW_NUMBER() OVER (ORDER BY id)) AS [_cake_page_rownum_] ' .
'FROM articles) AS _cake_paging_ ' .
'WHERE (_cake_paging_._cake_page_rownum_ > :c0 AND _cake_paging_._cake_page_rownum_ <= :c1)';
'FROM articles WHERE title = :c0) AS _cake_paging_ ' .
'WHERE (_cake_paging_._cake_page_rownum_ > :c1 AND _cake_paging_._cake_page_rownum_ <= :c2)';
$this->assertEquals($expected, $query->sql());
}

Expand Down

0 comments on commit ace3754

Please sign in to comment.