marcofiset's avatar

Trying to test email with Codeception

I am following the "Testing Email" video, using Codeception instead of PHPUnit. I am using the command bus architecture as described in the "Commands and Domain Events" series.

When I run my test, I get this error message :

Maximum function nesting level of '100' reached, aborting!

The call stack shows me 32 lines of Codeception function calls, initializing and running my test steps. Then Laravel picks up and routes my request (lines 33-43). Then there is my own code, which ultimately calls Mail::send at line 56.

Next funtion calls are mostly facades resolution, service providers calls, object instantiation, then the Swift mail class loading, and it reaches 100 function calls and fails.

Have you guys run into this issue? I believe that 100 nested function calls is a bit tight, since I only just began developping my app and I am doing only simple things for the moment. How can I fix this problem?

0 likes
1 reply
marcofiset's avatar
marcofiset
OP
Best Answer
Level 1

Never mind, I added the following config to my php.ini :

[xdebug] xdebug.max_nesting_level = 200

Please or to participate in this conversation.