While debugging your Laravel application, you often use functions like dd(), dump(), etc. Architecture testing in Pest may help you scan the code before pushing to the repository, to ensure these functions don't exist anymore.
This is just one use-case. The architecture plugin allows you to check, for example, that only Enum files are in the specified folders.
Let's take a look at a practical example.
First, let's create a test.
php artisan make:test ArchTest
Let's check for debugging calls.
tests/Feature/ArchTest.php:
arch('No debugging calls are used') ->expect(['dd', 'dump']) ->not->toBeUsed();
If any debugging calls are left, we will...