Skip to content

Commit

Permalink
Added test case to cover the query object as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jan 20, 2014
1 parent 79ff83d commit e6aabf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestCase/Database/ConnectionTest.php
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit e6aabf6

Please sign in to comment.