Before we can use Codeception to test our code, we first need to configure Codeception to work with Yii2:
yii2-codeceptionpackage and the Codeception base package via Composer:
$ composer require --dev codeception/codeception $ composer require --dev yiisoft/yii2-codeception $ composer require --dev yiisoft/yii2-faker
--dev flag on our composer command ensures that development packages are not installed in our production environment. Packages installed with
–dev will be added to the
require-dev section of our
composer.json file. Storing Codeception and other testing code reduces the dependencies we need in production and makes our code ...