[DependencyInjection] Test constants

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | **yes**
| License       | MIT

Added a test for constant support in XML configuration files.
Related PR: #8661