Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Testing
technicpack/solder
cursor
api
technic
solder

Testing

Install
php artisan boost:add-skill technicpack/solder

Save this content to: .cursor/rules/testing.md

# Testing

- Every change must be programmatically tested. Write a new test or update an existing test, then run it.
- Do not create verification scripts or tinker when tests cover the functionality. Unit and feature tests are more important.
- All tests must be PHPUnit classes. Use `docker compose -f compose.dev.yml exec -T solder php artisan make:test --phpunit {name}` to create a new test. Pass `--unit` for unit tests. Most tests should be feature tests.
- If you see a test using "Pest", convert it to PHPUnit.
- Use factories for test models. Check for custom factory states before manual setup.
- Faker: follow existing conventions (`$this->faker` vs `fake()`).
- Cover all happy paths, failure paths, and edge cases.
- Run the singular test after every update. When feature tests pass, ask user about running the full suite.
- Do not remove tests or test files without approval.

## Running Tests

- Run the minimal number of tests using an appropriate filter before finalizing.
- All tests: `docker compose -f compose.dev.yml exec -T solder php artisan test --compact`
- Single file: `docker compose -f compose.dev.yml exec -T solder php artisan test --compact tests/Feature/ExampleTest.php`
- Specific test: `docker compose -f compose.dev.yml exec -T solder php artisan test --compact --filter=testName` (recommended)

Testing

  • Every change must be programmatically tested. Write a new test or update an existing test, then run it.
  • Do not create verification scripts or tinker when tests cover the functionality. Unit and feature tests are more important.
  • All tests must be PHPUnit classes. Use docker compose -f compose.dev.yml exec -T solder php artisan make:test --phpunit {name} to create a new test. Pass --unit for unit tests. Most tests should be feature tests.
  • If you see a test using "Pest", convert it to PHPUnit.
  • Use factories for test models. Check for custom factory states before manual setup.
  • Faker: follow existing conventions ($this->faker vs fake()).
  • Cover all happy paths, failure paths, and edge cases.
  • Run the singular test after every update. When feature tests pass, ask user about running the full suite.
  • Do not remove tests or test files without approval.

Running Tests

  • Run the minimal number of tests using an appropriate filter before finalizing.
  • All tests: docker compose -f compose.dev.yml exec -T solder php artisan test --compact
  • Single file: docker compose -f compose.dev.yml exec -T solder php artisan test --compact tests/Feature/ExampleTest.php
  • Specific test: docker compose -f compose.dev.yml exec -T solder php artisan test --compact --filter=testName (recommended)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console