From e6aabf61a2c6e80580b3955d913f84717d4efb37 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Mon, 20 Jan 2014 16:26:00 -0500 Subject: [PATCH] Added test case to cover the query object as parameter --- tests/TestCase/Database/ConnectionTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/TestCase/Database/ConnectionTest.php b/tests/TestCase/Database/ConnectionTest.php index 62d6893cffb..2a9ca772308 100644 --- a/tests/TestCase/Database/ConnectionTest.php +++ b/tests/TestCase/Database/ConnectionTest.php @@ -120,6 +120,11 @@ public function testPrepare() { $result = $this->connection->prepare($sql); $this->assertInstanceOf('Cake\Database\StatementInterface', $result); $this->assertEquals($sql, $result->queryString); + + $query = $this->connection->newQuery()->select('1 + 1'); + $result = $this->connection->prepare($query); + $this->assertInstanceOf('Cake\Database\StatementInterface', $result); + $this->assertEquals($sql, $result->queryString); } /**