public function field($field)
{
$this->currentField = (string) $field;
return $this;
}
public function testOperatorWithCurrentField() { $expr = new Expr(); $expr->field('field'); $this->assertSame($expr, $expr->operator('$op', 'value')); $this->assertEquals(array('field' => array('$op' => 'value')), $expr->getQuery()); }