You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2018. It is now read-only.
Great Bundle! I am using it a lot to setup the base data of the application before populating the database with the data of the symfony1 application.
However, for test purposes, I would like to be in the position to load only a few fixtures,
The first tests should see an empty DB, then loading - test by test - the database from scratch, but test 1 would contain only 1 fixture, test 2 the first 2 or 3 etc. This would require to modify YamlLoader::loadFixtureFiles only.
I would like to create a class to extend YamlLoader and overwrite loadFixtureFiles and/or loadFixtures.
Can you make the bundle flexible enough to load a different class ilo Khepin\YamlFixturesBundle\Loader\YamlLoader to be specified in the config file? (cf FOSUserBundle)
The text was updated successfully, but these errors were encountered:
The "tag" functionality already allows you to do this and chose
exactly which features you want to load. Or am I missing your point?
—
Reply to this email directly or view it on GitHub #18 (comment).
If I would need only one type of database setup, I could use the tags,
but the way I am setting it up I would need many tags. The idea is to
load test by test more fixtures:
BookControllerTest requires 001_book.yml
LanguageControllerTest requires 001_book.yml and 002_language.yml
CatalogueControllerTest requires 001_book.yml and 002_language.yml and
003_catalogue.yml
etc. etc.
Ok, so normally if you only have one database it would still work.
If you have 2 (or more) databases and therefore (2 or more doctrine entity managers), then some works needs to be done.
If you don't use the "purge" option, you also could load things incrementally:
fixture set 1
fixture set 2 (while keeping fixture set 1)
etc...
If it still doesn't fit your needs, feel free to make a pull request to allow setting the loader through the config. Add a test. And then we're good to go.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Great Bundle! I am using it a lot to setup the base data of the application before populating the database with the data of the symfony1 application.
However, for test purposes, I would like to be in the position to load only a few fixtures,
The first tests should see an empty DB, then loading - test by test - the database from scratch, but test 1 would contain only 1 fixture, test 2 the first 2 or 3 etc. This would require to modify YamlLoader::loadFixtureFiles only.
I would like to create a class to extend YamlLoader and overwrite loadFixtureFiles and/or loadFixtures.
Can you make the bundle flexible enough to load a different class ilo Khepin\YamlFixturesBundle\Loader\YamlLoader to be specified in the config file? (cf FOSUserBundle)
The text was updated successfully, but these errors were encountered: