Permalink
Browse files

Added a test with multiple calls to modifier

  • Loading branch information...
1 parent fcb7209 commit 2b6044afa4d8becfc0449a3b3cfd49b628c7cc96 @jrbasso jrbasso committed Jan 20, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/TestCase/Database/QueryTest.php
@@ -1101,6 +1101,14 @@ public function testSelectModifiers() {
$result = $query
->select(['city', 'state', 'country'])
->from(['addresses'])
+ ->modifier('DISTINCTROW')
+ ->modifier('SQL_NO_CACHE');
+ $this->assertSame('SELECT DISTINCTROW SQL_NO_CACHE city, state, country FROM addresses', $result->sql());
+
+ $query = new Query($this->connection);
+ $result = $query
+ ->select(['city', 'state', 'country'])
+ ->from(['addresses'])
->modifier(['TOP 10']);
$this->assertSame('SELECT TOP 10 city, state, country FROM addresses', $result->sql());
}

0 comments on commit 2b6044a

Please sign in to comment.