Skip to content

Symfony Integration issue with TestConnectionFactory #22

@hantsy

Description

@hantsy

I have updated packages to testcontainrs/testcontainers.

I followed the guide in the readme, created a TestConnectionFactory, and declared in the config/packages/test/services.yml.

But when running the tests, it can not find the host 127.0.0.1 and port 5432.

Check the test file: https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/tests/Repository/PostRepositoryTestWithTestConnectionFactory.php

And services.yml file: https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/config/packages/test/services.yml

And the TestConnnectionFactory file :https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/tests/TestConnectionFactory.php

It seems the TestConnectonFactory is not applied at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions