Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MrMoto9000's avatar

Tests are suddenly failing

I've been developing project for a few weeks and my 28 tests have been passing consistently. Today I added some things in preparation for deployment to staging, and now suddenly my tests are no longer working. Even really basic ones started to fail.

I forced a clearing of my cache through the artisan command (cache:clear, view:clear, config:clear, route:clear) and some of the previously not working tests started to work again.

What's incredibly strange is if I manually enter the stages from within the tests in Tinker... they work fine. They work absolutely as expected. What's more, when I use the app everything is working as expected. The only place things aren't working is in the tests... and I haven't changed the tests at all.

I feel all I've has been very innocuous. Add the following package to composer: vemcogroup/laravel-sparkpost-driver, update my Stripe keys to different account's, and add an .ebextensions folder for deployment to AWS.

Why would my tests suddenly become temperamental? I'm pulling my hair out!

0 likes
4 replies
neilstee's avatar
neilstee
Best Answer
Level 34

@johnnyw2001 you should get a hint on what error is showing when you run the tests.

Maybe some change in your phpunit.xml is causing the trouble?

MrMoto9000's avatar

I could kiss you! I forgot there was another STRIPE_KEY in the PHPUNIT.XML. Everything is working fine again. Thank you!

1 like

Please or to participate in this conversation.