public function testBasic() { $escaped = Expr\TextComparisonExpression::escapeString('.abc*123_abc'); $this->assertEquals('\\.abc\\*123_abc', $escaped); }
/** * postfix * Match postfix * @param mixed $field * @param mixed $value * @access public * @return void */ public function postfix($field, $value) { if (!$value instanceof Expr\ConditionalExpression) { $value = $this->buildPart(Expr\TextComparisonExpression::WILDCARD_STRING . Expr\TextComparisonExpression::escapeString((string) $value)); } return new Expr\TextComparisonExpression($field, $value, Expr\TextComparisonExpression::MATCH); }