-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InvalidArgumentException : "App\Tests\DataFixtures\UserFixtures1" is not a registered fixture #57
Comments
Please share the code of your fixture. What version of Symfony do you use ? Do you use autowiring of services? It can work for your case: https://github.com/liip/LiipFunctionalTestBundle/issues/504#issuecomment-480640875 |
I'm playing around with the symfony demo app, so it's Symfony 5. But with Symfony 4 I get the same issue. I have the impression that the problem comes from the fact that the fixture is not found in /src/DataFixtures because with that it works. |
IIRC, this bundle relies on DoctrineFixturesBundle. According to its documentation:
Source: https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html#loading-fixtures Maybe the class should implement Here is how they are declared in internal tests, with a service tag: LiipTestFixturesBundle/tests/App/config.yml Lines 45 to 47 in 2370ab6
Maybe you can use a config like this in your |
Did the last comment helped you? |
I think so, as I didn't followed it up. Let's close this. |
Hi,
This is probably not a but, maybe a configuration issue or something similar.
If the fixtures are not in use App\DataFixtures directory then I get the following error message:
Any suggestion how to register App\Tests\DataFixtures\UserFixtures1 as fixture?
The text was updated successfully, but these errors were encountered: