public function CriteriaTest::testConstructor in Plug 7
File
- lib/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ CriteriaTest.php, line 18
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testConstructor() {
$expr = new Comparison("field", "=", "value");
$criteria = new Criteria($expr, array(
"foo" => "ASC",
), 10, 20);
$this
->assertSame($expr, $criteria
->getWhereExpression());
$this
->assertEquals(array(
"foo" => "ASC",
), $criteria
->getOrderings());
$this
->assertEquals(10, $criteria
->getFirstResult());
$this
->assertEquals(20, $criteria
->getMaxResults());
}