webfactory / symfony-application-tests

Contains several generic test scenarios that can be applied to Symfony applications.
MIT License
10 stars 1 forks source link

Check service types #25

Open Matthimatiker opened 8 years ago

Matthimatiker commented 8 years ago

It is possible to configure a service that does not fulfill the configured type constraint:

project.repository.custom:
    class: stdClass
    factory: ["@doctrine.orm.entity_manager", getRepository]
    arguments: ["Project\Entity\MyEntity]

It could be helpful to have a test that finds this kind of configuration error early.