Using Codeception with Symfony2. Calling grabServiceFromContainer('doctrine') from a functional TestGuy returns a very empty Codeception\Maybe object, not the expected service.
How do you get access to Symfony services from the functional test? Is it not possible? You can from the unit TestGuy - why not from the functional TestGuy? Do I have to fetch the module first?
It works for me with this functional.suite.yml config:
class_name: TestGuy
modules:
enabled: [Symfony2, Doctrine2, TestHelper]
config:
Symfony2:
app_path: 'app'
environment: 'test'
make sure you run the "build" command after changing the config, maybe that is the problem?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With