/** * A boolean flag to enable or disable case sensitive search for $text * criteria. * * This method must be called after text(). * * @see Expr::caseSensitive() * @see http://docs.mongodb.org/manual/reference/operator/text/ * @param bool $caseSensitive * @return $this * @throws BadMethodCallException if the query does not already have $text criteria * * @since 1.3 */ public function caseSensitive($caseSensitive) { $this->expr->caseSensitive($caseSensitive); return $this; }
/** * @expectedException BadMethodCallException */ public function testCaseSensitiveRequiresTextOperator() { $expr = new Expr(); $expr->caseSensitive('en'); }