Permalink
Browse files

Added test case to cover the query object as parameter

  • Loading branch information...
jrbasso committed Jan 20, 2014
1 parent 79ff83d commit e6aabf61a2c6e80580b3955d913f84717d4efb37
Showing with 5 additions and 0 deletions.
  1. +5 −0 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);
}
/**

0 comments on commit e6aabf6

Please sign in to comment.