From 2b6044afa4d8becfc0449a3b3cfd49b628c7cc96 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Mon, 20 Jan 2014 14:36:40 -0500 Subject: [PATCH] Added a test with multiple calls to modifier --- tests/TestCase/Database/QueryTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php index 4fc1e090464..70c8247abbd 100644 --- a/tests/TestCase/Database/QueryTest.php +++ b/tests/TestCase/Database/QueryTest.php @@ -1097,6 +1097,14 @@ public function testSelectModifiers() { ->modifier(['DISTINCTROW', '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('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'])