Testing event-driven logging means testing the full chain:
User action -> Event -> Listener -> Service -> DB record -> Geo job
Each link can break independently. each link gets its own test.
A logging system that silently breaks is worse than no logging.
#Laravel #PestPHP #Testing #LaraFoundry
This single Pest test proves the override system works
Revoke beats role. Grant beats role. Hierarchy intact.
#LaraFoundry #Laravel #Testing #PestPHP
LaraFoundry auth test: banned users can still access support tickets.
Because if someone gets banned by mistake, they need a way to appeal.
Edge cases matter.
#LaraFoundry #Laravel #PestPHP #UX
I’ve built a Laravel package to generate HTTP fixtures with Faker data for your tests. Easily fake real HTTP responses in a factory-like format.
👉 github.com/Gromatics/ht...
#Laravel #PHP #Testing #OpenSource #DevTools #Faker #PestPHP #HttpFake #BlueskyDev
🧪 With this snippet, you can extend your Pest tests using Laravel’s base test case, apply RefreshDatabase, and set global headers before each test. Clean, DRY, and Laravel-friendly! #Laravel #PestPHP #Testing
🧪 If you're testing file uploads with Laravel and Pest, putting Storage::fake('public') in a beforeEach keeps your system clean and your tests safe! #Laravel #PestPHP #Testing
Custom #expectations in #PestPHP let you modify test value on the fly within callbacks, creating visual symmetry between regular assertions and fake object testing
🔄 Seamlessly switch between regular and fake object expectations
#Testing: Unified Expectations API with #PestPHP for Custom Fakes 🧪
#PHP #Laravel #testing fakes with unified API approach: transform $client->assertSent() into expect($client)->toHaveSent() for cleaner test code
🧵👇#TDD
🔹 Updated for #Laravel 12.0 and #Livewire 3.0 with multilingual support
🔹 Includes #PestPHP for testing, #LivewireAlerts for notifications, and #LaravelPint for code style
🔹 Simple installation process with comprehensive documentation
📢 #PHP 8.4 RC3 ready for testing! #PHPStorm 2024.3 EAP opens with full PHP 8.4 support. #ThePHPFoundation joins #opensource pledge & launches Web Services Tool. New #Composer 2.8.0 & #PestPHP v3 released. #Laravel #Symfony turns 19! 🎂
blog.jetbrains.com/phpstorm/202...
Hey #laravel and #filamentphp devs, don't forget to define your current panel in your test with #pestphp, it will save you time !!
Real life experience 🤣
By the way RTFM !!
Effortlessly test all #php #Laravel routes with pest-plugin-route-testing 🚀
✅ Verify all routes
🔍 Test specific routes with wildcards
🔗 Handle model bindings
🛠️ Customizable assertions
#pestphp #testing
github.com/spatie/pest-...
I wrote a little blurb about my new found fondness of testing in PHP. Previously, almost a decade ago, getting tests to work was a pain. Golang was a breath of fresh air.
Today, in 2024, testing on PHP is good actually if you use Pest
javorszky.co.uk/2024/05/06/p...
#weblogpomo2024 #php #Pestphp