Created Unit tests for getRoutesByName with defined idPrefix.

[Doctrine] [Phpcr] [RoutePrivder] Fixed LSmith's early optimizations, and added Unit tests to cover.

| Q                   | A
| --------------------- | ---
| Bug fix?          | no
| New feature?   | no
| BC breaks?     | no
| Deprecations? | no
| Tests pass?    | yes
| Fixed tickets   | 
| License           | MIT