public function CriteriaTest::testAndWhere in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php \Doctrine\Tests\Common\Collections\CriteriaTest::testAndWhere()
File
- vendor/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ CriteriaTest.php, line 39
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testAndWhere() {
$expr = new Comparison("field", "=", "value");
$criteria = new Criteria();
$criteria
->where($expr);
$expr = $criteria
->getWhereExpression();
$criteria
->andWhere($expr);
$where = $criteria
->getWhereExpression();
$this
->assertInstanceOf('Doctrine\\Common\\Collections\\Expr\\CompositeExpression', $where);
$this
->assertEquals(CompositeExpression::TYPE_AND, $where
->getType());
$this
->assertSame(array(
$expr,
$expr,
), $where
->getExpressionList());
}