diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index 18a78b781..4013d215d 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -397,6 +397,13 @@ class SqlserverTest extends CakeTestCase { )); $result = $this->db->getLastQuery(); $this->assertRegExp('/^SELECT DISTINCT TOP 5/', $result); + + $this->db->read($this->model, array( + 'fields' => array('DISTINCT SqlserverTestModel.city', 'SqlserverTestModel.country'), + 'limit' => '5' + )); + $result = $this->db->getLastQuery(); + $this->assertRegExp('/^SELECT DISTINCT TOP 5/', $result); } /**