Custom Mailer for tests

I’m overriding Mailer class with my own and use it to create queue of emails.

When I run tests, it seems to be using another class (Codeception\Lib\Connector\Yii2\TestMailer), which I understood form this Exception:




[yii\base\UnknownMethodException] Calling unknown method: Codeception\Lib\Connector\Yii2\TestMailer:



And the questions is the following: how to set custom Mailing class for tests? Where do I need to set it up?

This is my own issue :)

Solved in https://github.com/yiisoft/yii2/issues/14718#issuecomment-325304020