[ExpressionLanguage] added some tests for the built-in constant() function

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10216
| License       | MIT
| Doc PR        | n/a