M
M
multiscripter2019-09-22 01:28:45
Yii
multiscripter, 2019-09-22 01:28:45

How to log in methods called from Codeception tests?

Good day to all!
Made a halloworld using Yii2.
Filed a few custom events.
Added Yii::info() logging to the event handler method.
If I call trigger () in the controller, then everything works fine: logging in the methods of event handlers works fine.
When trigger() is called from a method in a unit test class, no logging occurs.
In one of the handlers (ForOwnerTicketBusinessHandler) I specially added calls to Yii::debug(), Yii::warning() and Yii::error().
From the unit test, none of the logging methods in the event handler methods work.
Who knows, tell me, please, what needs to be done to make logging work when calling tests?
Codeception 2.3.9
Code:
https://github.com/multiscripter/yii2botnet

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question