Custom Mailer for tests


(Sasha Tesh) #1

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?


(Alexander Makarov) #2

(Sasha Tesh) #3

This is my own issue :)


(Sasha Tesh) #4

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