How to load fixture?

I use a simple fixture to populate the table in the test database. But when I try to load it, check integrity code throws exception ‘Table not found: []’.


namespace tests\unit\fixtures;

use yii\test\ActiveFixture;

class IdentityDocumentFixture extends ActiveFixture


    public $modelClass = 'backend\modules\persons\models\IdentityDocument';


To load fixture, I use this command from @app/tests:

C:\php-projects\ais\tests\codeception\bin>yii fixture/load IdentityDocument

Fixtures namespace is:


Global fixtures will be used:

        1. yii\test\InitDb

Fixtures below will be loaded:

        1. IdentityDocument

Load above fixtures? (yes|no) [no]:yes

As a result, I get this error message:

Stack trace:

How to load fixture? A test database exists, the data sources are configured correctly.

Check: IdentiyDocument::tableName