#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
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
🔹 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
Building Custom Laravel Packages: From Basics to Advanced Features 🔧
🎯 #Laravel package development walkthrough shows implementation of method #caching using #PHP attributes and #composer initialization
🧪 Emphasizes #TDD approach using #Orchestra Testbench and #PestPHP for robust package testing
⚡ Covers essential concepts including service providers, dependency injection, and #caching implementation with practical examples
🔄 Demonstrates workflow optimization using local repository linking instead of direct deployment to #GitHub or #Packagist
🛠️ Includes setup of package structure, namespace configuration, and integration of facades and console commands
📚 Features comprehensive guide to #autoloading and package auto-discovery for seamless integration
🔄 #PHP Core Updates
• #PHP 8.4 RC3 available for testing, final release expected Nov 21
• Security updates released for PHP 8.1.30, 8.2.24, and 8.3.12
• New RFC proposals for closure support in constant expressions and persistent curl handles
🛠️ Tools & Frameworks
• #Composer 2.8.0 launches with patch-only updates and new command options
• #PestPHP v3 introduces mutation testing and arch presets
• #APIplatform 4 released with official #Laravel support
• #Symfony celebrates 19th anniversary with version 7.2 updates
🏢 Community & Foundation
• #ThePHPFoundation joins #opensource pledge
• New Web Services Tool for PHP-FPM delivered
• Core roundup series relaunched in partnership with PHP.Watch
• Foundation actively seeking new sponsors
🎯 Development Tools
• #PHPStorm 2024.3 EAP launched with full PHP 8.4 support
• New profiling extension with web UI: php-spx
• imliam/cpx introduces npx-like functionality for PHP
• Multiple new testing and code quality tools released
https://blog.jetbrains.com/phpstorm/2024/10/php-annotated-october-2024/
A Guide to Architecture #Testing Presets in Pest 3 https://benjamincrozat.com/pest-3-architecture-testing-presets?s=09
Effortlessly test all #php #Laravel routes with pest-plugin-route-testing 🚀
✅ Verify all routes
🔍 Test specific routes with wildcards
🔗 Handle model bindings
🛠️ Customizable assertions
https://github.com/spatie/pest-plugin-route-testing/tree/main
Přijde vám #PHPUnit moc konzervativní resp. neinovativní anebo pomalý? Zkuste #PestPHP a možná budete nadšení stejně jako já 😎 viz https://pestphp.com
Spent today converting a project from #phpunit to #Pestphp. Took a while to get set up with the Pest config file, but much prefer the readability and the built in parallel testing.
Haven't managed to get the `--dirty` option to work yet though.
Inside the Sail container I get no output. Outside the container I get an error saying git is required...
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 such a breath of fresh air.
Today, in 2024, testing on PHP is good actually if you use Pest
https://javorszky.co.uk/2024/05/06/pest-in-php-is-good-actually/
"Whereas your traditional tests test the functionality of your application, architecture tests test the structure of your application." —Ash Allen
Learn how to write architecture tests in Laravel with Pest, a popular PHP testing framework. 🔗👇
Have you run into flaky tests in your PHP or Laravel code base? Learn another option for debugging those tests using the repeat method in Pest PHP.
When working with PestPHP I was always annoyed that PhpStorm didn't simplify the imported namespace and didn't offer to simplify the FQN of Facades.
First one is a setting:
Editor > General > Auto Import > PHP > Enable auto-import in file scope
Second one can be fixed, by disabling all aliases in a Laravel app by setting ` 'aliases' => []` in `config/app.php`.
You know, I like pest php's syntax. But I hate that I lost the @covers statement in docblocks, referring to class methods. pest php does not seem to support it. #pestphp
Using #pestphp's new Stressless plugin delivers the expected results for a @statamic site with full static caching - thanks to @nunomaduro for this great new #pestphp plugin to the ecosystem.
After a big push, I’ve migrated all Codeception tests in the Blitz plugin to #PestPHP tests using Mark Huot’s @craftcms Pest plugin. The test suite now runs 100 feature tests in under 5 seconds (previously 30s) and automatically generates a test spec at https://github.com/putyourlightson/craft-blitz/blob/develop/tests/TESTS.md
New version of #PestPHP is out today, with type coverage and the Drift plugin! Thanks, @nunomaduro! #LaraconUS #Laracon
Bumped the Forme plugin/theme boilerplates onto #PestPHP v2 💪 https://github.com/formewp/forme-plugin/commit/46c284d583ab7d61c3b0c80052bcd588c433a399