I have the same error. If you run your tests separately, everything is ok.
Larabook ch 27 - functional test SignUpCept fatal error
Everything works when I try it out in the browser, but when I run my tests I get this error: PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/vagrant/larabook/vendor/composer/ClassLoader.php on line 309
When I change the call from mail->queue to mail->send the tests works OK:
$this->mail->send($view, $data, function($message) use($user, $subject) {
$message->to($user->email)->subject($subject);
});
I have figured it out why the tests break. It is because of codeception Laravel4 module. There is a huge bug in it :) but I can't find it.
I am using Codeception 2.0.5, PHPUnit 4.2.6.
See:
I also experienced this bug and am still investigating it. As a temporary measure I was able to resolve it by increasing the xdebug.max_nesting_level. Assuming you are using Homestead, in order to do that do this:
- cd /etc/php5/mods-available/
- sudo vi xdebug.ini
- type i and move the cursor to the end of the file.
- type in xdebug.max_nesting_level = 1000
- press esc
- type :wq
- Then cd back to your project root and try vendor/bin/codecept run again. Everything should work then and if not you may need to restart apache.
This seems a little bit like a patch and not a solution so we should continue to investigate the problem.
@devinfd Thanks man, this helped me. I just started receiving this error today after the recent L5 updates. Not sure why. This definitely feels more like a patch but heck, it works. Would be curious if anyone else is experiencing the issue or found a way around it.
I found this error too. Trying to use Illuminate\Contracts\Mail\MailQueue and send an email with the queue function and it throws me a Maximum function nesting level exception. But if I use Illuminate\Contracts\Mail\Mailer everything works perfectly. I am using L5 and the error appears both in Homestead and in my local environment...
I'm having a different error after recent L5 framework updates where functional tests fail on any form submission. I thought it might have been CSRF related but having checked the tokens being generated/submitted in the tests they seem to match. Sadly the error generated is not very useful.
I've got a sneaking suspicion it relates to Session data not being generated/stored correctly during tests, but haven't been able to pin it down yet.
For example some of my tests which don't involve form submissions fail because flash messages aren't being passed to the view (for example logout).
Manually testing it all seems to work fine.
Some more info: https://laracasts.com/discuss/channels/general-discussion/l5-codecept-broken-since-bootstrapstartphp-removed
I'm having the same problem using the most recent dev releases. There's something goofed with the Laravel4/5 codeception module when Queues are used.
Please or to participate in this conversation.