.. index:: single: Fixtures
Fixtures are used mainly for testing, but also for having your shop in a certain state, having defined data - they ensure that there is a fixed environment in which your application is working.
Note
The way Fixtures are designed in Sylius is well described in the FixturesBundle documentation.
To check what fixtures are defined in Sylius run:
php bin/console sylius:fixtures:list
The recommended way to load the predefined set of Sylius fixtures is here:
php bin/console sylius:fixtures:load
All files that serve for loading fixtures of Sylius are placed in the Sylius/Bundle/CoreBundle/Fixture/*
directory.
And the specified data for fixtures is stored in the Sylius/Bundle/CoreBundle/Resources/config/app/fixtures.yml file.
Configuration key | Function |
---|---|
load_default_locale | Determine if default shop locale (defined as %locale%) parameter will be loaded. True by default. |
locales | Array of locale codes, which will be loaded. Empty by default. |