You are here

public function CriteriaTest::testConstructor in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php \Doctrine\Tests\Common\Collections\CriteriaTest::testConstructor()

File

vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CriteriaTest.php, line 18

Class

CriteriaTest

Namespace

Doctrine\Tests\Common\Collections

Code

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());
}