3

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?

1 Answer 1

2

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?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.