The last testing component we'll talk about in this chapter is fixtures. Fixtures are an important part of testing as they enable us to set up our application state to a known and precise state before running our unit tests. Unlike these other test types, however, fixtures are provided directly by Yii2 and integrate into Codeception via the Yii2 Codeception module.
In this section, we'll be using the source code on the
fixtures branch located at https://github.com/masteringyii/chapter10.
To get started with using fixtures, we first need to install the required composer dependencies and then add some configuration to our
yii2-faker composerpackage is installed: ...