public function testDispatchCompositeConstraints($method, $expectedClass, $nbConstraints)
{
$this->primeBuilder();
$where = $this->qb->where();
$composite = $where->{$method}();
for ($i = 0; $i < $nbConstraints; $i++) {
$composite->fieldIsset('alias_1.prop_2');
}
$res = $this->converter->dispatch($where);
$this->assertInstanceOf($expectedClass, $res);
if ($nbConstraints == 2) {
$this->assertInstanceOf('PHPCR\\Query\\QOM\\PropertyExistenceInterface', $res->getConstraint1());
$this->assertInstanceOf('PHPCR\\Query\\QOM\\PropertyExistenceInterface', $res->getConstraint2());
} elseif ($nbConstraints > 2) {
$this->assertInstanceOf($expectedClass, $res->getConstraint1());
$this->assertInstanceOf('PHPCR\\Query\\QOM\\PropertyExistenceInterface', $res->getConstraint2());
}
}