The laravel/laravel skeleton requires phpunit/phpunit: ^12.5.12, which installs PHPUnit 12.5.35 79,198 , and its phpunit.xml runs tests on SQLite 4,756 :memory: with array mail, cache and sessions. The Laravel 2,157 installer 5.32.0 asks "Which testing framework do you prefer?", with Pest as the default (or pass --pest/--phpunit). For Pest it runs what you would run by hand: composer remove phpunit/phpunit --dev, composer require pestphp/pest pestphp/pest-plugin-laravel --dev -W and vendor/bin/pest --init.
Pest 5.2.1 (17 September 2026) is a layer over PHPUnit. It needs PHP 8.4 and PHPUnit 13.3.4, so -W upgraded PHPUnit from 12.5.35 to 13.3.4. It adds closures, expect(), architecture tests and mutation testing, and class-based tests keep running under php artisan test. One trap: the generated tests/Pest.php comments out ->use(RefreshDatabase::class), so the first Pest test failed with "no such table: products" until the line was restored:
pest()->extend(TestCase::class)
->use(RefreshDatabase::class)
->in('Feature');
test('the catalog is sorted by name', function () { // tests/Feature/CatalogTest.php
Product::factory()->create(['name' => 'SQL Basics']);
Product::factory()->create(['name' => 'Apache Cookbook']);
$this->getJson('/products')->assertOk()->assertJsonPath('data.0.name', 'Apache Cookbook');
expect(Product::count())->toBe(2);
});PASS Tests\Feature\CatalogTest ✓ the catalog is sorted by name 0.22s