Search code examples
silverstripefixturesbehat

How do I load an fixture.yml in silverstripe?


I can't find it in the documentation : Silverstripe-behat-extension

I have a feature file that has some testing scripts. Now I want to fill some test content in a temp database.

So I create a yml file that puts the content in the database. But how do I load the yml file in my features file?


Solution

  • In your feature use:

    Background: Given a file "/absolute/path/my-data-fixture.yml"