Recent posts with #Testing

đź§Ş Laravel testing trick

Need to temporarily disable a facade fake like Queue, Event, or Http during a test? Just store the real instance with getFacadeRoot() and swap it back with swap() 🔄

Control your fakes like a pro 🎯

#Laravel #PHP #Testing
image

• •

44

•
•

“Writing tests slows us down.”

This is a common argument — and in the short term, it can feel true.

But over time, teams that don’t write tests move slower:
• More regressions
• More hotfixes
• More blame

Tests aren’t just about catching bugs — they’re about building trust, clarity, and stability.

Testing is how you invest in sustainable delivery.

#SoftwareEngineering #CleanCode #TeamCulture #Testing #DevEx

• •

87

•
•

Laravel devs, tired of random strings messing up your tests? 🎲

Take control with Str::createRandomStringsUsing() for consistent results. 📏

When you're ready, just flip back to normal with Str::createRandomStringsNormally(). ♻️

Testing's now a cakewalk! 🤞 #laravel #testing
image

1 • •

141

•
•

Leveling up testing efficiency! đź’ˇ

No need for extra middleware tests when you can validate it during job dispatch. 🛠️

Cleaner, simpler, better! đź’Ľ
#Laravel #Testing
image

• •

107

•
•

đź•’ Master Time-Dependent Testing in Laravel

Ever struggled to test code that relies on timestamps or scheduled events?

With freezeTime, you can control the clock and write consistent, reliable tests—no more flaky results due to real-time changes!

#Laravel #PHP #Testing
image

• •

156

•
•