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
package-testing
netipar/laravel-dev-login
claude-code
pest
orchestra-testbench
tdd
package-testing
arch-tests
composer-scripts

Use this skill when writing, editing, fixing, or reviewing package tests with Pest 4/5 and Orchestra Testbench, including TDD, feature tests, unit tests, type coverage, arch tests, workbench behavior, commands, routes, config, migrations, and publishable resources.

Install
php artisan boost:add-skill netipar/laravel-dev-login

Save this content to: .claude/skills/package-testing/SKILL.md

# Package Testing

## Primary Goal

Prove package behavior with Pest 4/5, Orchestra Testbench, and the local `tests/TestCase.php` setup before or alongside implementation.

## Workflow

1. Start with TDD: write the smallest failing package test for the requested behavior, then implement the smallest change that makes it pass.
2. Cover happy-path, unhappy-path, and edge-case behavior when the feature has meaningful failure modes.
3. Prefer focused feature tests for package integration behavior and arch tests for broad constraints.
4. Use `composer test:unit -- --filter ...` while iterating, `composer test:types` when type-sensitive tests or code changed, and `composer test` before finishing.
5. Keep real package tests in the suite and remove only throwaway tests that were explicitly created for local scaffolding experiments.

## References

- `tests/TestCase.php`
- `tests/Pest.php`
- `tests/Feature/`
- `tests/Unit/`
- `tests/ArchTest.php`
- `composer.json` scripts

## Examples

- Test config merge and config override by asserting default package config, then overriding the host config value in the Testbench app.
- Test publishable assets, migrations, views, lang files, or config by invoking vendor publish behavior and asserting the target path exists.
- Test routes with Testbench HTTP requests, commands with Artisan assertions, migrations with a SQLite test database, and workbench behavior after `composer build` when needed.

## Anti-Patterns

- Deleting real package tests because they are inconvenient.
- Relying only on smoke tests when behavior needs assertions.
- Testing implementation details when observable package behavior is available.
- Keeping throwaway scaffolding experiment tests in the package test suite.

Package Testing

Primary Goal

Prove package behavior with Pest 4/5, Orchestra Testbench, and the local tests/TestCase.php setup before or alongside implementation.

Workflow

  1. Start with TDD: write the smallest failing package test for the requested behavior, then implement the smallest change that makes it pass.
  2. Cover happy-path, unhappy-path, and edge-case behavior when the feature has meaningful failure modes.
  3. Prefer focused feature tests for package integration behavior and arch tests for broad constraints.
  4. Use composer test:unit -- --filter ... while iterating, composer test:types when type-sensitive tests or code changed, and composer test before finishing.
  5. Keep real package tests in the suite and remove only throwaway tests that were explicitly created for local scaffolding experiments.

References

  • tests/TestCase.php
  • tests/Pest.php
  • tests/Feature/
  • tests/Unit/
  • tests/ArchTest.php
  • composer.json scripts

Examples

  • Test config merge and config override by asserting default package config, then overriding the host config value in the Testbench app.
  • Test publishable assets, migrations, views, lang files, or config by invoking vendor publish behavior and asserting the target path exists.
  • Test routes with Testbench HTTP requests, commands with Artisan assertions, migrations with a SQLite test database, and workbench behavior after composer build when needed.

Anti-Patterns

  • Deleting real package tests because they are inconvenient.
  • Relying only on smoke tests when behavior needs assertions.
  • Testing implementation details when observable package behavior is available.
  • Keeping throwaway scaffolding experiment tests in the package test suite.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource