Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Additional assertion to ensure binding params doesn't change actual r…

…esult
  • Loading branch information...
commit 80179d6ccbd501c8c2c4e2e5c00c42f4929bb022 1 parent a6a20bd
@arvenil authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/testsuite/runtime/query/CriteriaTest.php
View
10 test/testsuite/runtime/query/CriteriaTest.php
@@ -804,6 +804,16 @@ public function testAddJoinMultipleValue()
$params = array();
$result = BasePeer::createSelectSql($c, $params);
$this->assertEquals($expect, $result);
+
+ $con = Propel::getConnection(BookPeer::DATABASE_NAME);
+ $c = new Criteria();
+ $c->addMultipleJoin(array(
+ array(AuthorPeer::ID, BookPeer::AUTHOR_ID),
+ array(BookPeer::ISBN, 3)
+ ));
+ AuthorPeer::doSelectOne($c, $con);
+ $expectedSQL = 'SELECT author.id, author.first_name, author.last_name, author.email, author.age FROM author INNER JOIN book ON (author.id=book.author_id AND book.isbn=3) LIMIT 1';
+ $this->assertEquals($expectedSQL, $con->getLastExecutedQuery());
}
/**

0 comments on commit 80179d6

Please sign in to comment.
Something went wrong with that request. Please try again.