#PestPHP

2025-04-05

#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

2025-04-05

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

2025-03-02

🔹 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

2024-11-25

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

Source: youtu.be/QsA5mdzKXLA?si=tEfLmq

2024-10-31

🔄 #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

blog.jetbrains.com/phpstorm/20

2024-07-19

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-plugin-

Martin Hlaváčhlavacm
2024-06-27

Přijde vám moc konzervativní resp. neinovativní anebo pomalý? Zkuste a možná budete nadšení stejně jako já 😎 viz pestphp.com

2024-06-26

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

javorszky.co.uk/2024/05/06/pes

#weblogpomo2024 #php #Pestphp

2024-04-30

"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. 🔗👇

honeybadger.io/blog/laravel-pe

#PHP #Laravel #PestPHP #Testing #ArchitectureTesting

2024-02-25

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.

#php #laravel #pestphp

seankegel.com/fix-flaky-tests-

Tim Van Dijcktimvandijck@mas.to
2024-02-09

Me: “Hmm, maybe I need to add a template for new #pestphp files in PHPStorm.”

Me after 10 seconds: “Bruh, it's just an empty PHP file”.

Time for an other morning coffee I guess. ☕️

#laravel

2024-02-03
2024-01-24

#til

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`.

#laravel #pestphp #phpstorm

Code example of two fully qualified names:
\Illuminate\Support\Facades\Queue::fake();
\App\Models\User::create();
2023-12-16

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.

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.

Output from running Pest PHP's Stressless plugin for 10 seconds with 10 concurrent users
Ben Crokerbencroker
2023-08-03

After a big push, I’ve migrated all Codeception tests in the Blitz plugin to 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 github.com/putyourlightson/cra

One hundred feature tests running in under five seconds.
PHP Communityphpc@phpc.social
2023-07-19

New version of #PestPHP is out today, with type coverage and the Drift plugin! Thanks, @nunomaduro! #LaraconUS #Laracon

Nuno Maduro on stage presenting at Laracon US

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst